Advertisement

default timeout of overlapped send and recv?

Started by December 05, 2005 05:46 AM
1 comment, last by efortier 19 years, 2 months ago
Hi all, I was curious to know if a connection from a client to a server that does not explicitely use timeouts will eventually timeout or close if no data is received for a long period of time (long = 15+ minutes). I do not set the SO_RCVTIMEO or SO_SNDTIMEO option on the socket. I've just looked over the excellent "Network Programming For Windows 2nd Edition", and I couldn't find this information. Thanks!
TCP is, conceptually, timeout-less. It'll say up "forever". However, some systems impose a finite upper deadline (something like 2 hours or more). What's even worse is that some (broken) firewalls will silently drop a TCP connection if no traffic has been had for a few minutes (I've seen as low as 10).

I'd recomment sending a single byte every 30 seconds or so, if you care about the connection staying up.
enum Bool { True, False, FileNotFound };
Advertisement
Many thanks. I had completely overlooked the firewall layer!

Eric

This topic is closed to new replies.

Advertisement