my $written = syswrite($sock, $buf, 1024); if (not defined $written) { close_sock($sock); } [download]
Originally posted as a Categorized Question.
In reply to How do i detect that the client has disconnected ? (i'm using sysread/write) by shlomi