
15 Dec
2009
15 Dec
'09
3:50 a.m.
Jonathan Franklin
On Mon, Dec 14, 2009 at 10:52 AM, Nicola Michael Gutberlet
wrote: Im using TCP sockets and wonder, if theres a possibility to get an automatic notification when one side of a socket is closed (even if the other side is crashed / not closed properly).
You generally have to do a read on the socket to reliably detect when the other side has closed (or crashed).
And a write, too, or else use TCP keepalives. Otherwise a crashed client which is never sending anything will not send any error indication for you to read. ----Scott.