Questions tagged [asio]

ASIO stands for Audio Stream Input/Output, a digital audio protocol. For questions about the Boost.Asio C++ library for asynchronous I/O, use the [boost-asio] tag to avoid ambiguity.

Audio Stream Input/Output is a low-latency protocol for sending and receiving audio data from sound interfaces. It was developed by Steinberg, which offers a licensed ASIO SDK among other audio software technology such as VST plugins.


Please note that in order to avoid ambiguity, questions about Boost.Asio should be tagged with as discussed on meta.

479 questions
2
votes
2 answers

How to use boost::beast, download a file no blocking and with responses

I have started with this example so won't post all the code. My objective is to download a large file without blocking my main thread. The second objective is to get notifications so I can update a progress bar. I do have the code working a couple…
lakeweb
  • 1,859
  • 2
  • 16
  • 21
2
votes
3 answers

Performance of multithreaded TCP networking

I'm working on a project using the TCP protocol that may have to work with many 100s or more connections at once. As such, I am uncertain as to what method I should collect and send this data. I was wondering whether the principal of more threads =…
Icedude_907
  • 172
  • 3
  • 11
2
votes
1 answer

Asio synchronous IPv6 UDP server

https://github.com/ThinkalVB/RTDS-Server I am making a simple UDP IPv6 server that prints version of the UDP packet sent by the remote endpoint. But this code is acting strangely. When sending IPv6 and IPv4 packets it is printing IPv6. What is that…
Thinkal VB
  • 189
  • 3
  • 12
2
votes
1 answer

I have a question about C ++ boost :: asio and std :: async

I know that both are designed asynchronously. What I'm curious about is the function callback when creating a thread using the above two. Is it possible for a single thread to write and read asynchronously?
Hwan E
  • 566
  • 2
  • 13
2
votes
1 answer

Does boost asio ssl::stream supports multiple pending http::async_write calls?

I have a http client that performs http::async_write() with a callback that performs http::async_read() on ssl::stream. All the async operations are wrapped in the same explicit strand. The simplified code looks like this http::async_write( …
kirararara
  • 31
  • 1
2
votes
1 answer

How to pass boost::asio::yield_context through my own function?

Given a coroutine spawn into.. void my_coroutine(asio::yield_context yield) { system::error_code ec; my_wrapper(yield[ec]); if (ec) { // something went wrong return; } ... } void my_wrapper(asio::yield_context&&…
2
votes
1 answer

boost::asio doesn't trigger the read handler, while wireshark sees data comming in

I am trying to send some data and act on the reply. I see (using wireshark) that data is sent and received by the system, but boost::asio doesn't trigger my callback. Does somebody has an idea what I am doing wrong? #include #include…
ikku
  • 405
  • 3
  • 14
2
votes
1 answer

Boost asio read from stdin asynchronously

I want to read from standard input (in terms of c++, std::cin) with boost asio function async_read(). The following code does not compile and gives me a very long error message due to instantiation error. Can someone answer, how do I read from stdin…
2
votes
2 answers

boost::asio problem passing dynamically sized data to async handler

I am processing custom tcp data packet with boost. Since all operations are asynchronously a handler must be called to process the data. The main problem is that I don't know how to pass the data to the handler when the size is not known at…
Kyu96
  • 1,159
  • 2
  • 17
  • 35
2
votes
1 answer

boost::asio read handler type requirements not met

I am trying to implement a read header handler as a member function to process incoming data. However during compilation I am told that the type requirements are not met. I've checked the the boost docs and the function signatures seem to be fine. I…
Kyu96
  • 1,159
  • 2
  • 17
  • 35
2
votes
1 answer

Is boost::asio::thread_pool thread safe when posting tasks on multiple threads?

I'm submitting more than one tasks to boost::asio::thread_pool concurrently. But official document does not talk about thread safe of boost::asio::thread_pool. the boost lib version is 1.69. And my code like below: /*define a thread pool*/ …
icewall
  • 41
  • 4
2
votes
1 answer

According to the doc of boost 1.68, old io_context::post is deprecated. boost::asio::post() is recomanded. Can anyone give me an example?

I want to use the feature of asio::io_context::post. But I found it was marked as DEPRECATED You can see it here (Deprecated: Use boost::asio::post().) Request the io_context to invoke the given handler and return immediately. Then I want to have a…
2
votes
0 answers

Route ASIO input to WDM virtual microphones

I'm doing some sound manipulation with the Dante Virtual Soundcard (DVS). The software I am using (ffmpeg) can only record from WDM microphones. DVS has a limitation of 8 stereo channels for WDM, so I'm seeing if I can use the 64 channel ASIO…
JohnX
  • 23
  • 3
2
votes
1 answer

What the ‘typename’ mean in asio allocation exmple

the line 109 show in asio allocation example template class handler_allocator { ... private: template friend class handler_allocator; // line 109 ... } I wonder what the template < typename > mean ? Is it template <…
foo
  • 398
  • 1
  • 16
2
votes
1 answer

How to integrate Boost::ASIO with userland network stack?

Is there a way to integrate Boost::ASIO with a userland network stack such as F-stack or DPDK? I am looking for a way of getting the performance benefits of the userland stacks, but maintaining the API for Boost::ASIO to be able to use all of the…
Halcyon
  • 1,376
  • 1
  • 15
  • 22