any ideas why stream.flush();
won't work?
boost::asio::ip::tcp::iostream stream("localhost","5000");
assert(stream.good());
stream << 1;
stream.flush();
while(true);
it's only flushed if the loop is removed and the line
boost::this_thread::sleep(boost::posix_time::seconds(1));
is executed (much later).
Thanks
Update: I did some more debugging and the problem is in fact not the flush command. If I let my code connect to a netcat server everything works fine. I assume the problem is that both client and server are in the same process (I create two threats one acts as a server one as a client). When I put them in separate processes everything works fine, but when both are in the same process the transfer stalls until sleep is called... (this is only for testing reasons, later both will run on different servers).
Platform is WindowsXP.
Any ideas why this is happening?