boost-asio Questions
1
Solved
My question
How do I avoid a data race when using two threads to send and receive over an asio::ip::tcp::iostream?
Design
I am writing a program that uses an asio::ip::tcp::iostream for input an...
Berey asked 5/1, 2018 at 16:23
1
I have a simple client /server application the code of which is mentioned below.
Please run the server in one shell and the client in another shell in linux.
First start the server and then the c...
Monarchal asked 3/1, 2018 at 11:3
4
Solved
using Yield = asio::yield_context;
using boost::system::error_code;
int Func(Yield yield) {
error_code ec;
asio::detail::async_result_init<Yield, void(error_code, int)> init(yield[ec]);
st...
Auvergne asked 1/11, 2014 at 23:39
1
Is it possible to use boost::circular_buffer with boost::asio?
Specifically I want to read a fixed number of bytes with boost::asio::async_write and store them directly in the circular buffer with...
Vassaux asked 8/11, 2013 at 13:6
2
Solved
Here's my implementation :
Client A send a message for Client B
Server process the message by async_read the right amount of data and
will wait for new data from Client A (in Order not to block C...
Versicle asked 13/10, 2011 at 13:16
4
Solved
I have a TCP server using boost asio. I have accepted a socket connection. How to get IP, Port of machine my server is communicating with?
BTW: Is it possible to get info on what ip that connected...
Decca asked 18/3, 2011 at 13:37
1
Solved
I am trying to implement double buffering for my network server when it sends to clients. The idea came from
boost::asio::async_write - ensure only one outstanding call
Unfortunately, as great a...
Cottony asked 22/12, 2017 at 16:9
1
I need a parallel synchronous TCP solution using ASIO. I'm trying to get the example code from these examples working: https://github.com/jvillasante/asio-network-programming-cookbook/tree/master/s...
Denham asked 7/12, 2017 at 9:33
3
Solved
I'm trying to send a http GET request using the REST API of some domain.
Basically what I'm trying to do is to replace following curl request:
curl -k -H "Content-Type: application/json" -X GET
...
Enclosure asked 25/2, 2015 at 19:52
1
Solved
I am using a boost::asio::deadline_timer like so to set some timeout before an async_read operation on a tcp socket. I am using boost 1.61.
long time_out_millis = 2000;
boost::asio::deadline_timer...
Seek asked 29/11, 2017 at 22:53
4
Solved
I'm learning Boost::asio and all that async stuff. How can I asynchronously read to variable user_ of type std::string? Boost::asio::buffer(user_) works only with async_write(), but not with async_...
Diplomat asked 7/5, 2010 at 17:23
1
Solved
In this source file there are two classes : tcp_connection and tcp_server. I've seleceted the relevant bits of code in my opinion but you might want to refer to the full source code for more inform...
Dissolution asked 23/11, 2017 at 16:33
1
I am trying to simulate boost::asio::write with timeout. Or you can say, I am trying to use boost::asio::async_write with a timeout.
As I see, boost::asio::write blocks until all data has been wri...
Kelly asked 19/11, 2017 at 14:34
2
I was reading the documentation of Boost Asio and it says that
boost::asio::async_write_some may NOT transfer all of the data to the peer. Consider using the async_write function if you need to...
Helen asked 18/11, 2017 at 13:41
1
Solved
When I lose connection, in my server code, I try to reconnect in a loop forever. Once I reconnect, I send a login message to the component I am connected to. That component then sends back a login ...
Rossman asked 27/10, 2017 at 17:56
1
I'd like to create an asynchronous function which takes as it's last argument boost::asio::yield_context. E.g.:
int async_meaning_of_life(asio::yield_context yield);
I'd also like to be consis...
Luigi asked 20/10, 2017 at 15:17
3
How do I handle the control-C event or stop my boost::asio server. I have a tcp & udp combined server and would like to be able to exit cleanly when I press ctrl-c. I get a first chance excepti...
Barrio asked 15/6, 2011 at 21:34
5
Solved
My project uses windows.h in which winsock.h is used, and I need to include boost:assio which uses winsock2. So I get many errors that says Winsock.h already included.
I can define WIN32_LEAN_AND_M...
Fabron asked 17/3, 2012 at 13:27
3
Solved
can you set SO_RCVTIMEO and SO_SNDTIMEO socket options in boost asio?
If so how?
Note I know you can use timers instead, but I'd like to know about these socket options in particular.
Regardless asked 15/11, 2008 at 20:13
1
Solved
I am trying to use Boost-Deadlinetimer inside a DLL, which is loaded using boost::dll::shared_library. Following code-snippets are reduced to the essentials.
Example.h:
#include <boost/asio.hp...
Hassler asked 11/8, 2017 at 15:15
4
Solved
I am trying to port a big project from gcc (Linux) to msvc (windows), using cmake and boost libraries.
The project compile and runs fine for gcc but on msvc it returns the following error:
Dyna.o...
Despotic asked 26/7, 2011 at 15:36
3
Solved
I have a problem concerning boost asio libraries. I successfully tried to create a socket between a client and a server, this involves creation of resolvers in order to specify ip and port to the s...
Bottali asked 25/11, 2010 at 8:32
2
Solved
My application have an asio server socket that must accept connections from a defined List of IPs.
This filter must be done by the application, (not by the system), because it can change at any ti...
Eggcup asked 20/8, 2010 at 11:44
4
Solved
I know there is a version of ASIO that is not included in the Boost namespace, but even then ASIO depends on Boost, but I'm wondering if there is a way to get ASIO to work without dependencies on B...
Juanjuana asked 8/4, 2009 at 3:7
1
Solved
There are 3 thin threads with manual low-latency context switching in the Boost:
Boost.Coroutine: http://www.boost.org/doc/libs/1_64_0/libs/coroutine/doc/html/index.html
Boost.Coroutine2: http://...
Leavelle asked 13/6, 2017 at 12:11
© 2022 - 2024 — McMap. All rights reserved.