Q&A > network programming > How do i detect that the client has disconnected ? (i'm using sysread/write) contributed by Zombie shlomi
Hello Paul, Thank you for the reply . I did some more reading about syswrite in perldoc but there's nothing about returning errors except the undef value (EAGAIN??). I don't want to use "IO::Whatever" , I want to do this using only low level functions.
My goal is a low level server, non-blocking, non-forking ,multiple connections ... its working , but i have this problem with the detection of disconnected sockets.
can you please give me a short example of using getpeername for detection ?