Boost Users :
Subject: [Boost-users] [ASIO] Thread safety of socket.write_some & socket.read_some
From: James12 (james791d_at_[hidden])
Date: 2008-10-29 08:50:02
I'm a beginner in using boost asio library (and coding c++ too :).
I am currently trying to code a simple application that handles some
communication with a server through TCP/IP connection.
My I/O Class has two threads that use synchronous socket operations on the
same socket (which is a member of the class)
CApplication::Write(data from another class)
- socket.read_some(boost::asio::buffer((void *)&character, 1));
- package bytes to messages and pass them on to another class
My question is that is it safe to call write_some and read_some from
different threads without synchronization.
The application is now working w/o problems but I need to be sure that this
is a safe way to do this before continuing development.
Thanks for your reply,
-- View this message in context: http://www.nabble.com/-ASIO--Thread-safety-of-socket.write_some---socket.read_some-tp20222810p20222810.html Sent from the Boost - Users mailing list archive at Nabble.com.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net