Can I use separate streams for reading and writing with Boost.Asio?

According to the Boost Documentation , when calling multiple threads, a thread io_service::run()pool is defined that the IO service can use to perform asynchronous tasks. It explicitly states that all threads that join the pool are considered equivalent.

Does this mean that it is not possible to have a separate stream for reading from a socket and a separate one for writing? If possible, how to implement this?

+3
source share
1 answer

, io_service::run(), . , . , io_service:: run() 2 , socket::async_send socket::async_receive , , . , .

+5

Source: https://habr.com/ru/post/1724582/


All Articles