"DaTurk" <mm******@hotmail.com> wrote in message
news:11**********************@f6g2000cwb.googlegro ups.com...
I want to know when a socket disconnects so I can attempt to reconnect.
Is there any special type of pattern to doing this? Is there an evnt
raised?
If the other endpoint sends RST, you will get an error the next time you
call any read or write function. If the network breaks (remote endpoint
rebooted, too many lost packets, whatever), then TCP typically retries for
an extremely long time (less and less frequently) without ever determining
the connection is lost. Many TCP-based protocols have keep-alive and
timeout for this reason.