Sign in to follow this  
efortier

default timeout of overlapped send and recv?

Recommended Posts

efortier    106
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!

Share this post


Link to post
Share on other sites
hplus0603    11347
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this