boost-asio Questions
6
Solved
What is the easiest way to check if a socket was closed on the remote side of the connection? socket::is_open() returns true even if it is closed on the remote side (I'm using boost::asio::ip::tcp:...
Gilliette asked 4/5, 2009 at 3:5
1
Solved
I am trying to work on a project for a class and I want to use CMake to build the project. My current project looks like
|-bin
|-CMakeLists.txt
|-include
|-asio-1.12.2
|-chat_message.hpp
|-cha...
Icao asked 8/3, 2020 at 22:17
1
I'm new to using boost, and threadpools. I want to pass a function to a threadpool that takes a variable as a parameter. In this simple example I'm just passing in an integer. My understanding is p...
Lysander asked 5/3, 2020 at 18:41
1
Solved
I have a copy of asio::io_service::strand.
Are the copied strand and its source different executors? In other words is it possible that a function passed to the copied strand and another function p...
Binate asked 17/2, 2020 at 12:14
1
Solved
I found this interesting link
boost::asio::spawn yield as callback
and since that might be what I need I wanted to try out the following part:
template <class CompletionToken>
auto async_fo...
Judon asked 1/2, 2020 at 10:3
1
Solved
I am using boost asio library with c++. I found that io_service and io_context have similarities. for example both have method run and others. Could someone please detail differences between these ...
Ito asked 15/1, 2020 at 14:24
3
Solved
I am using boost::asio to transfer data to & fro from client to server. I have a reader thread on client side to read data received on the socket on client side. Please note that I am using boo...
Stinkwood asked 6/1, 2017 at 16:31
3
Solved
I've been having a problem with boost::asio where timer and/or sockets created using a global io_service instance crash during construction. The system where the crash occurs is as follows:
Windo...
Ie asked 20/7, 2015 at 15:28
4
Solved
I'd be interested in aspects like:
scope/features
performance
maturity
Kilocalorie asked 10/7, 2012 at 23:22
3
I'm trying to modify the echo server example from boost asio and I'm running into problem when I try to use boost::asio::async_read_until. Here's the code:
#include <cstdlib>
#include <i...
Saki asked 17/6, 2010 at 1:21
5
Solved
could someone summarize in a few succinct words how the boost shared_from_this<>() smart pointer should be used, particularly from the perspective of registering handlers in the io_service us...
Blum asked 2/9, 2010 at 17:23
2
I'am currently exploring the Asio library and have working code for regular TCP connections. I used asio::ip::tcp::iostream objects since stuff I want to transmit already can serialize to/deseriali...
Exorable asked 22/1, 2019 at 15:6
5
I'm using asio synchronous sockets to read data over TCP from a background thread. This is encapsulated in a "server" class.
However, I want the thread to exit when the destructor of this class is...
Klemm asked 6/12, 2009 at 23:10
2
Solved
I am adapting the synchronous HTTP client from the Boost Beast examples. Unfortunately the example client does not include timeout options and sometimes gets stuck in my workloads. I tried adding t...
Deweese asked 30/6, 2019 at 23:11
4
Solved
According to the documentation:
"The program must ensure that the stream performs no other write operations (such as async_write, the stream's async_write_some function, or any other composed oper...
Singer asked 20/12, 2017 at 19:24
3
Solved
I have a class which handles my connection that has a boost::asio::io_service member. I'm wanting to call io_service::run() from a std::thread, but I am running into compilation errors.
std::threa...
Fireworm asked 9/6, 2014 at 1:39
3
I'm using boost version 1.47, visual studio 2010, I downloaded the binaries for windows and linked to the include directory and lib directory from my project preferences. But I still can't use any ...
Deed asked 21/3, 2012 at 12:52
5
Solved
I've got a C++ application that is using ZeroMQ for some messaging. But it also has to provide a SGCI connection for an AJAX / Comet based web service.
For this I need a normal TCP socket. I could...
Mab asked 10/10, 2012 at 21:53
1
Solved
As you can see here in this example UDP server, the run method will keep the application running forever. (tested)
So there is no need to use the work class as mentioned in the documentation
From b...
Merl asked 18/3, 2019 at 15:10
1
Solved
Im using mingw64.
How can I make https-request using boost beast lib?
I got code below and it works, but I recieve answer:
"400 The plain HTTP request was sent to HTTPS port"
What should I compl...
Tersina asked 10/3, 2019 at 18:29
2
Solved
Can Boost ASIO be used to build low-latency applications, such as HFT (High Frequency Trading)?
So Boost.ASIO uses platform-specific optimal demultiplexing mechanism: IOCP, epoll, kqueue, poll_se...
Arrington asked 8/6, 2017 at 23:19
1
Solved
There are classes that I write (often as part of boost::asio) whose objects depend on being wrapped in a shared_ptr because they use shared_from_this(). Is there a way to prevent an object from bei...
Lanctot asked 27/12, 2018 at 19:34
3
I'm working on Boost Asio and Boost Beast for simple RESTful server. For normal HTTP and TCP socket, it works perfectly. I put it under load test with JMeter, everything works fine.
I tried to add...
Consort asked 5/6, 2018 at 6:45
2
I'm trying to clear up some confusion I have. I stumbled over boost::asio::thread_pool and I thought that one could use to somehow automatically combine boost::asio::io_context and boost::thread::t...
Triceps asked 18/9, 2018 at 0:21
2
Solved
I'm trying to send a protocol buffer message over TCP, but on the receiving side I'm getting a "Missing required fields" error when trying to parse, even though apparently all the fields are there....
Jackie asked 18/12, 2012 at 12:58
© 2022 - 2024 — McMap. All rights reserved.