any ideas why stream.flush(); will not work?
boost::asio::ip::tcp::iostream stream("localhost","5000"); assert(stream.good()); stream << 1; stream.flush(); while(true);
it is cleared only if the loop is deleted and the line is boost::this_thread::sleep(boost::posix_time::seconds(1));
(much later).
thanks
Update: I did some more debugging, and the problem is not really a flush command. If I let my code connect to the netcat server, everything will be fine. I assume that the problem is that both the client and the server are in the same process (I create two threats, one of which acts as a server as a client). When I put them in separate processes, everything works fine, but when both are in the same process, the transfer stops until sleep is called ... (this is only for testing reasons, later both will work on different servers).
The platform is WindowsXP.
Any ideas why this is happening?
Janick bush
source share