boost-asio Questions

2

I'm trying to create a tcp::acceptor and a libtorrent::session side by side, but I get an access violation exception when waiting for input from std::cin. The access violation occurs in the Boost I...
Duodecillion asked 8/1, 2015 at 20:53

4

Solved

I want to verify the connection status before performing read/write operations. Is there a way to make an isConnect() method? I saw this, but it seems "ugly". I have tested is_open() function as...
Phantasm asked 2/10, 2009 at 18:31

1

Solved

While using boost::asio 1.66 I read in the documentation that boost::asio::io_context::post is deprecated for boost::asio::post, same for boost::asio::io_context::dispatch. Because before they wher...
Appropriate asked 22/9, 2018 at 16:27

3

Solved

I was writing an asynchronous logging framework, where I had multiple threads dumping data. I started playing around Boost asio because it offered some easy ways to enforce serialization and orderi...
Dempstor asked 20/3, 2012 at 3:1

1

Solved

According to my knowledge and as far as I checked the boost::asio documentation and source code there is no way to destroy explicitly all pending handlers on a given io_context aside from destroyin...
Mcintyre asked 3/9, 2018 at 9:13

1

Solved

I'm currently using boost::asio for a project, and have to send buffers to remote endpoints. My current algorithm for sending the data looks like this: void send_the_data(DataElement const& d...
Mammiemammiferous asked 6/8, 2018 at 17:22

3

We've been using asio in production for years now and recently we have reached a critical point when our servers become loaded just enough to notice a mysterious issue. In our architecture, each s...
Eagan asked 27/10, 2016 at 17:55

1

Solved

Which is the correct way to close and clean up a socket? I have the io_service running in a secondary thread and I need to close the connection from the main thread: void closeConnection() { ioc...
Komatik asked 22/7, 2018 at 20:6

4

Solved

I am looking to write a server application in C++ that is meant to handle tens of thousands of clients simultaneously. It should run under Windows and Linux. I have been looking around for framewor...
Bowie asked 15/7, 2011 at 0:15

2

I am trying to use boost:asio library to create a threadpool. The official documentation says : dispatch : Request the io_service to invoke the given handler. post: Request the io_service to invok...
Wiser asked 18/6, 2018 at 14:3

3

Solved

My code is as follows: declaration: boost::asio::ssl::stream<boost::asio::ip::tcp::socket> m_remote_socket; m_remote_socket.shutdown(ec); if (ec) { cdbug<<"id: "<<m_id<<...
Bes asked 9/3, 2013 at 15:10

1

Solved

I'm writing tests for my full-duplex server, and when I do multiple (sequential) async_write calls (although covered with a strand), I get the following assertion error from boost::beast in the fil...
Ulotrichous asked 6/6, 2018 at 19:21

1

Currently I'm trying to make it possible to remove work queued through post or dispatch to an io_context. The work is queued by a small amount of queuer groups for which the work shall be removeabl...
Oxygen asked 20/5, 2018 at 3:17

1

Solved

I am creating a C++ server application using standalone Asio and C++11 and am getting an error, which is why I am asking for help. The error In the class worker_thread, during the call to shared_...
Siqueiros asked 13/5, 2018 at 16:46

2

I am creating a TCP server that will use boost asio which will accept connections from many clients, receive data, and send confirmations. The thing is that I want to be able to accept all the clie...
Heel asked 25/10, 2017 at 14:25

1

I've modified the http_sync example to connect through a proxy, I've tested with wireshark and the problem is that after I send the http connect request, the proxy returns with the code 200 OK, and...
Watterson asked 14/4, 2018 at 23:14

1

So i am in a bit of stand off here and im not sure exactly how to go about proceeding, or if its even fixable... We use a 3rd party SDK provided by another team, this SDK must be used for our app ...
Foolhardy asked 2/4, 2018 at 15:38

1

Solved

I am using Boost.Asio ssl streams, and got a working encrypted socket from which I can send and receive bytes. I successfully did a GET request with the following code : // Construct HTTP reques...
Alright asked 18/3, 2018 at 22:47

4

Solved

I'm reading from a boost::asio::ip::udp::socket like this: using boost::asio::ip::udp; // ... char recv_buf[128]; udp::endpoint sender_endpoint; size_t len = socket.receive_from(boost::asio::buf...
Tripping asked 8/5, 2011 at 22:16

1

Solved

I need to implement a class which handle connect to ssl server. Pretty much based on this. However. it doesn't have reconnect feature. So I modify it like this: boost::asio::ssl::stream<boost::...
Fulminous asked 6/3, 2018 at 2:31

3

Solved

The below is as minimal of an example as I can get. It does need to be in separate files as that seems to be what causes the segmentation fault error. I'm using Mingw x32 4.8.1 with Asio standalon...
Chantell asked 6/10, 2015 at 13:12

1

Solved

I have a boost::process::child. There are many examples on how to get all its stdout or stderr in a single vector, but in this method you capture all data at once. But how to retrieve lines/charact...
Extra asked 15/2, 2018 at 21:40

3

Solved

I've two classes (Negotiator, Client), both has their own boost::asio::ip::tcp::socket. Is there a way to transfer socket object to Client after negotiation is finished. I'm looking forward to do s...
Grevera asked 3/6, 2010 at 13:23

1

Solved

i am trying to write and read to child's stdio using boost.process using something like this: boost::asio::io_service writeService, readService; bp::async_pipe in{writeService}; bp::async_pipe out...
Congelation asked 8/2, 2018 at 5:11

1

I am writing a protocol in Boost::ASIO which has the following requirements: Connections are long-lasting, and should use minimal overhead as possible to "keep alive". Messages are small, and nee...
Ecclesiasticus asked 1/1, 2018 at 6:20

© 2022 - 2024 — McMap. All rights reserved.