boost-asio Questions
3
Solved
I am hoping for some guidance regarding C++ templates. I have been using the boost::asio library for communication over TCP. Thus far, I have been using storage containers built into the boost::asi...
Iolanthe asked 1/6, 2011 at 14:17
2
The active object design pattern as I understand is tying up a (private/dedicated) thread life time with an object and making it work on independent data. From some of the documentation I read , th...
Paratyphoid asked 19/4, 2012 at 22:36
4
Solved
How do I create a thread pool using boost in C++, and how do I assign tasks to the threadpool?
Leaden asked 21/10, 2013 at 16:55
4
Solved
I'm trying to run the SSL examples from boost::asio and I'm getting an "Invalid argument" exception when I run them. I'm on Linux x86_64.
http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio/e...
Picard asked 23/6, 2011 at 10:43
3
A boost-asio SSL/TLS TCP socket is implemented as an ssl::stream over a tcp::socket:
boost::asio::ssl::stream<boost::asio::ip::tcp::socket> ssl_socket;
In the TLS protocol, a cryptographical...
Nijinsky asked 17/8, 2015 at 8:40
3
I have the example(*) code like this:
std::string protocol = "http";
std::string server = "www.example.com";
std::string path = "/";
asio::io_service service;
asio::ip::tcp::resolver resolver(se...
Oxeyed asked 21/11, 2015 at 9:28
4
Solved
I have adapted step 3 of the Boost asio tutorial to run forever, and display "tick" and "tock" once per second instead of the counter:
#include <iostream>
#include <boost/asio.hpp>
#in...
Stomach asked 7/6, 2012 at 15:2
1
Solved
When using C++20 coroutines with Boost.Asio it is possible to make an operation awaitable with either boost::asio::use_awaitable or boost::asio::deferred as in the following examples.
std::size_t n...
Craigcraighead asked 24/8, 2023 at 9:26
2
Solved
I am relatively new to CMake, and I'm trying use the boost asio library in my project.
I was able to get CMake to find other boost libraries such as smart_ptr and lexical_cast, but I get a linker e...
Amylaceous asked 16/1, 2010 at 20:58
1
Solved
When using pre-coroutine asio interface I could dispatch an async function in the current execution context (main function) and let it finish in the ctx.
#include <iostream>
#include <asio...
Essential asked 21/3, 2023 at 18:42
1
Solved
I'm confused by a Boost.Asio idiom I frequently see - calling a handler (function object) like this:
std::move(handler)(param1, param2);
What is the reason for writing it this way? My understandin...
Lo asked 16/3, 2023 at 11:14
2
I am trying to understand asynchronous models in C++. I am investigating 4 libraries that purport to deal with asynchronous I/O:
liburing (C version, C++ version): provides an interface for io_uri...
Vacation asked 26/7, 2022 at 19:18
1
The short version: I am trying to set the IP_TOS field on the traffic my application is sending and even though setsockopt returns successfully and getsockopt returns the correct IP_TOS value, the ...
Ceilometer asked 16/9, 2019 at 3:54
10
Solved
Is there a way to cancel a pending operation (without disconnect) or set a timeout for the boost library functions?
I.e. I want to set a timeout on blocking socket in boost asio?
socket.read_some...
Lally asked 15/11, 2008 at 0:31
4
Solved
Is it possible to perform an asynchronous wait (read : non-blocking) on a conditional variable in boost::asio ? if it isn't directly supported any hints on implementing it would be appreciated.
I ...
Mis asked 21/7, 2011 at 12:16
3
Solved
It is fairly easy to create IP, TCP or UDP sockets using boost::asio library. But when it comes to Ethernet sockets for instance, you need to implement boost/asio/basic_raw_socket.hpp
As there are...
Lovellalovelock asked 6/10, 2014 at 7:58
4
I know that OpenSSL, boost asio SSL implementation is based on, doesn't allow concurrent SSL_read() and SSL_write() (i.e. SSL_read() and SSL_write() executed by different threads).
Is it safe to c...
Licorice asked 23/8, 2013 at 18:28
1
Solved
I consider myself reasonably experienced with asio but can't figure out how to correctly perform async_read and async_write on a boost::asio::ssl::stream<boost::asio::ip::tcp::socket>. I have...
Ergener asked 24/10, 2022 at 20:46
1
Solved
I want to run service in one io_context and do bussiness logic in another io_context. But first I want to know more about re-dispatch behavior, so I write some experimental codes. Here is my first ...
Florey asked 17/8, 2019 at 1:44
6
Solved
My client application uses a boost::asio::ip::tcp::socket to connect to a remote server.
If the app loses connection to this server (e.g. due to the server crashing or being shutdown) I would like ...
Iridosmine asked 17/6, 2010 at 14:55
3
Solved
When using Boost.Asio stackful coroutines, how can I "manually" yield so that another coroutine or async operation has a chance to run? For example, I need to perform a long computation before send...
Millennium asked 30/9, 2014 at 18:17
4
Solved
I'm trying to rewrite a project using boost::asio::spawn coroutines. Some parts of the project cannot be changed. For example, the storage protocol library is also written with boost::asio, but wit...
Possess asked 30/6, 2014 at 19:49
7
Solved
I've noticed that boost.asio has a lot of examples involving sockets, serial ports, and all sorts of non-file examples. Google hasn't really turned up a lot for me that mentions if asio is a good o...
Fonzie asked 18/12, 2008 at 17:11
1
Solved
I started trying to learn Boost::Asio by reading the documentation and example code. I found things difficult to understand, particularly because the model seemed similar to coroutines.
I then deci...
Dislimn asked 12/7, 2022 at 20:46
3
Solved
Consider the functions
#include <iostream>
#include <boost/bind.hpp>
#include <boost/asio.hpp>
void foo(const uint64_t begin, uint64_t *result)
{
uint64_t prev[] = {begin, 0};
...
Lute asked 20/4, 2020 at 17:29
1 Next >
© 2022 - 2024 — McMap. All rights reserved.