|
I only do socket programming in Java, but one possible reason this may be happening is that you're not flushing your output buffer. I've never used C++ for network programming, so I can't tell you for sure. In Java, when you send data from output stream (like PrintWriter) associated with a socket, you sometimes need to call the flush() method to force the data out of the buffer. Otherwise, it will appear that the data was not received, when it was actually never sent.
|