View Single Post
Old 06-04-2005, 08:58 AM   #1 (permalink)
TheSheep
Registered User
 
TheSheep's Avatar
 
Join Date: Mar 2005
Location: UK
Posts: 11
TheSheep is on a distinguished road
Send a message via ICQ to TheSheep Send a message via AIM to TheSheep Send a message via MSN to TheSheep Send a message via Yahoo to TheSheep
Socket problem [Win32, ws2]

I've set up a client/server application communicating over a TCP port. Without going into too much detail, the client sends a message, the server replies, the client replies, etc. etc. until the server has sent all its data and transmits a termination message. At this point the server disconnects and the client should do the same.

For whatever reason, the client seems not to receive the final message. Since the socks API is single-threaded I'd expect that the entire packet would be sent before the send() function even returns, so I'm fairly confident the message is actually sent. It's also not a loss or lag problem, since this even occurs over my loopback.

Can anyone suggest why, instead of returning (even if returning an error), the recv() function on the client just hangs on the final message?
TheSheep is offline   Reply With Quote