boost-asio Questions
1
Solved
In the following example, the timer was associated with the io_context executor. But then, the handler is told to execute in the thread-pool. The reason is, because the handler actually executes bl...
Telescopium asked 31/5, 2022 at 11:42
1
Solved
I have read this question and tried to replicate the answer with the following code:
#include <iostream>
#include <syncstream>
#include <thread>
#include <coroutine>
#includ...
Kellen asked 24/4, 2022 at 9:16
2
Solved
I have created a simple HTTP request wherein I am sending GET,POST and PUT requests to the server. Next I want to switch to HTTPS connection using boost asio library, how should I proceed?
I have ...
Cobble asked 14/10, 2016 at 6:58
3
Solved
I'm new to boost.asio programming and i have difficulties linking boost libraries.
My question is that how to find out which libraries I should link to my project when I include asio headers.
For...
Labannah asked 29/9, 2014 at 17:34
2
Boost asio specifically allows multiple threads to call the run() method on an io_service. This seems like a great way to create a multithreaded UDP server. However, I've hit a snag that I'm strugg...
Unhook asked 2/11, 2014 at 19:47
8
Solved
I've added some functionality from boost::asio, which has precipitated some compiler "warnings":
Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately.
That problem was dealt with here. I...
Vogul asked 16/3, 2012 at 17:41
1
Solved
In the following example I start a worker thread for my application. Later I post some work to it. To prevent it from returning prematurely I have to ensure "work" is outstanding. I do th...
Athanasius asked 20/2, 2022 at 11:44
1
Solved
There is an example in asio, which caches the sent messages in a deque. I think when there are too many unsent messages in this deque, such as 1000, I want to process it through constbuffersequence...
Maros asked 16/2, 2022 at 12:7
1
Solved
I'm using asio (non-boost) to create a TCP server and while my code works it's not done properly because I'm calling asio::async_write from multiple threads. I think I should use strands but the mo...
Bindery asked 14/2, 2022 at 11:41
1
Solved
When looking through boost asio co_spawn documentation (https://www.boost.org/doc/libs/1_78_0/doc/html/boost_asio/reference/co_spawn/overload6.html), I see this statement, "Spawn a new corouti...
Huff asked 1/2, 2022 at 11:32
1
The asio::io_context constructor takes an optional concurrency hint that skips some internal locks when only a single thread will interact with the io_context or associated IO objects (or synchroni...
Bedmate asked 10/11, 2021 at 19:14
3
Solved
Does boost::asio::io_service guarantee that handlers are called in the same order that they are given via post()? I can't find anything saying this in the documentation. Assume that calls to io_ser...
Harry asked 22/6, 2011 at 15:51
3
Solved
I am using Boost 1.66.0, in which asio has built-in support for interoperating with futures (and for some time now). The examples I've seen online indicate how to achieve this cleanly when using ne...
Prate asked 20/4, 2018 at 22:55
1
We have some SSL communication using Boost asio. Connecting and communication works fine, but now we'd like to show the actual TLS version and cipher used by the connection.
The Boost asio objects...
Billposter asked 24/8, 2016 at 14:8
5
Solved
I want a very simple periodic timer to call my code every 50ms. I could make a thread that sleeps for 50ms all the time (but that's a pain)... I could start looking into Linux API's for making time...
Maisonette asked 24/11, 2010 at 13:56
6
I'm currently searching for a portable way of getting the local IP-addresses. Because I'm using Boost anyway I thought it would be a good idea to use Boost.Asio for this task.
There are several ex...
Derward asked 20/4, 2010 at 10:37
3
Solved
I'm working on a project that involves a boost::beast websocket/http mixed server, which runs on top of boost::asio. I've heavily based my project off the advanced_server.cpp example source.
It wo...
Congratulation asked 20/3, 2018 at 21:19
1
Solved
So I am using boost::beast as a WebSocket server.
I would like to receive a binary message and parse it using nlohmann::json.
However I get an error message:
none of the 3 overloads can convert par...
Trenton asked 19/8, 2021 at 13:46
2
Solved
Hello I'm trying to download content from webpage that uses https via C++. My very basic client program taken from the Boost asio examples compiles and runs fine, but when I test it eg with Google:...
Time asked 1/2, 2015 at 15:24
2
Solved
In the following code, I am trying to implement a program that runs a shell command and get the stdio, stderr and return code. I am doing it using boost process in the async mode as advised here.
...
Kenlay asked 3/10, 2018 at 9:34
1
Solved
I've a library is written using cppcoro and wish to use it with ASIO. But whenever I try to co_spawn a coroutine from said library. Boost complain that the awaitable type isn't correct.
For example...
Quenelle asked 2/5, 2021 at 3:22
1
Solved
I have a function that returns boost::asio::awaitable. What is the idiomatic way to convert this awaitable to std::future?
Heideheidegger asked 9/6, 2021 at 16:56
3
Solved
Does anyone know where to find a reference for boost error codes. In particular, error codes returned by asynchronous socket handlers?, Google and grepping the header files have tuned up empty.
Worthen asked 4/10, 2010 at 16:37
3
Solved
Asio v 1.11. The doc says that basic_stream_socket::get_io_service() member function is deprecated and get_executor() must be used instead. But the latter returns executor not io_service.
How to o...
Sudor asked 12/9, 2016 at 7:51
1
I want to use a library (https://github.com/onlinecity/cpp-smpp) and it's based on boost 1.41. But in our project, we are using 1.72.
There is a code there that gets io_service from a TCP socket (s...
Estonian asked 27/4, 2021 at 10:40
© 2022 - 2024 — McMap. All rights reserved.