Can I share boost::asio::tcp::socket object between 2 threads that perform read and write

后端 未结 1 671
星月不相逢
星月不相逢 2021-01-14 02:06

I have two threads, one sending and another receiving data via TCP socket. I use boost::asio::read() and boost::asio::write() for reading and writ

相关标签:
1条回答
  • 2021-01-14 02:39

    The socket is not thread safe when shared between two or more threads. For more information look at the Boost.Asio documentation.

    0 讨论(0)
提交回复
热议问题