Thread: Socket problem
View Single Post
Old Feb 28th, 2006, 1:56 PM   #2
jaeusm
Programmer
 
jaeusm's Avatar
 
Join Date: Feb 2006
Location: Columbus, OH
Posts: 84
Rep Power: 3 jaeusm is on a distinguished road
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.
jaeusm is offline   Reply With Quote