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 writing. My question is do I have to guard the access to socket object during read and write operation?
The other case would be what if I have two threads both writing using the same socket object?