|Welcome to the Monastery|
Answer: How do i detect that the client has disconnected ? (i'm using sysread/write)by entropy (Sexton)
|on Oct 05, 2001 at 02:53 UTC||Need Help??|
Q&A > network programming > How do i detect that the client has disconnected ? (i'm using sysread/write) - Answer contributed by entropy
The select() function will tell you when there is data waiting to be read on a socket. If the connection is lost, select() will lie and say there is something to be read. When you try to read the line, sysread will return undef.