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
1
vote
1 answer

asio::async_connect vs asio::connect. Is asio::connect a non-blocking sync?

I'm using the asio 1.18.1 standalone version (no boost) and I wonder about the difference between asio::connect and asio::async_connect. I can tell myself why I need async for my server, because the point of async is being able to deal with a lot of…
nop
  • 4,711
  • 6
  • 32
  • 93
1
vote
0 answers

Chat server/client using ASIO, unable to find the client example code

I'm about to use ASIO for a chat server/client. When I downloaded ASIO, it had built-in examples for the different C++ versions. Since I will be using C++ 17/20, I decided to take that particular example. The problem is that it is missing the client…
nop
  • 4,711
  • 6
  • 32
  • 93
1
vote
2 answers

boost asio asynchronous udp client, handler never triggered

I've been struggling with this for almost 2 weeks now and I think it's time for me to ask for help. I need to get data from a server running on a fpga. The server has been written by someone who's unfortunately no longer working with us. Though the…
osfe
  • 61
  • 5
1
vote
1 answer

error_category mismatch in asio when used across dlls

I have a problem with handling asio::error_code values when they are received from another dll or executable. For instance, I may run an asynchronous operation with a handler: socket.async_receive([](const asio::error_code& errorCode) { if…
Sergey Kolesnik
  • 3,009
  • 1
  • 8
  • 28
1
vote
0 answers

How does asio::ip::tcp::socket::async_wait behave?

I can't really understand the use described in asio documentation for socket::async_wait. It says: Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. What does pending error conditions…
Sergey Kolesnik
  • 3,009
  • 1
  • 8
  • 28
1
vote
0 answers

Share asio::io_context with dll?

I have an application that imitates state of a vehicle and uses various plugins to transmit data. Each plugin is loaded dynamically and provides protocol-specific implementation for an interface to send the data. By specification each plugin may be…
Sergey Kolesnik
  • 3,009
  • 1
  • 8
  • 28
1
vote
0 answers

Building OBS Studio Music Edition on windows CMake 'Configure' error

I'm having a problem building obs music edition on windows, running "Configure" on cmake-gui. I got this error CMake Warning (dev) at plugins/win-asio/CMakeLists.txt:38 (target_link_libraries): Link library type specifier "optimized" is followed…
Rui d'Orey
  • 982
  • 3
  • 13
  • 31
1
vote
1 answer

ASIO: getting deadlock when using several strands and threads with one io_context

I am compiling with Mingw64 on Windows the latest version of ASIO. I have a sandbox code for accepting tcp connections. I use one context, a strand per acceptor and a socket and 2 threads (I have read in the documentation that posting into two…
Sergey Kolesnik
  • 3,009
  • 1
  • 8
  • 28
1
vote
1 answer

C++ Asio connect to wss

I am trying to connect to a secure websocket using asio. This example will work for an ip address: #include #include int main() { asio::error_code ec; asio::io_context context; asio::io_context::work…
MTN
  • 11
  • 4
1
vote
0 answers

Portaudio opens stream but no sound at all

My unity project includes an unmanaged dll that links to portaudio dll which I've built, everything is configured and built for x86_x64 architecture. My unmanaged dll uses portaudio to open an ASIO audio stream. I want to build it as Universal…
1
vote
1 answer

g++10, C++20, boost 1.75.0 :: error: 'awaitable' has not been declared in 'boost::asio'

I tried to compile the example: echo_server_with_as_single_default.cpp from boost examples on an: ubuntu 18.04 boost 1.75.0 g++ 10.1.0 Using the following commands to compile&link (I know it's not optimal, I reused the makefile from another…
laurapons
  • 971
  • 13
  • 32
1
vote
1 answer

boost::asio::ip::tcp::acceptor terminates application when receiving connection request using async_accept

I want to make this simple server that listens to incoming connection requests, makes connections and sends some data. When I start this acceptor looks like it's working fine, it waits for those incoming connection requests, but when my client tries…
etrusks
  • 165
  • 1
  • 8
1
vote
1 answer

asio::io_service::run doesnt return after boost::asio::io_service::work is destroyed

As title says I'm having this problem when I can't understand why this thread never stops running even after Client's destructor destroys asio::io_service::work variable When I'm running this program output is always like this Anyone sees what…
etrusks
  • 165
  • 1
  • 8
1
vote
0 answers

Is there a tutorial I can follow to learn about the Steinberg ASIO SDK?

Is there a good tutorial I can follow to learn about the Steinberg ASIO SDK? I have been looking everywhere, but I can't seem to find even a simple example of playing a sine wave.
Lysander Mealy
  • 113
  • 1
  • 6
1
vote
1 answer

asio::high_resolution_timer gives inconsistent results on Windows

I'm writing a C++ application using asio for asynchronous networking and execution. In my application I want to be able to asynchronously call a function every 50 milliseconds with around one millisecond of error. I came up with this trivial example…