On client side, you can write:
$sock->shutdown(1);
to send an EOF to remote server.
When the server receive the EOF,it will end of writing socket to
client,and send back an EOF to client.At this point,the socket talks
between client and server have finished.






2005/10/31, Karjala <[EMAIL PROTECTED]>:
> I'm writing a simple client-server application, and I'm trying to find a
> way to tell if the other end of an open TCP connection has gone offline.
>
> I heard that with C you can send a packet of data and check if an ACK
> packet comes back. If it doesn't then the connection is closed. But how
> can that be done with Perl?
>
> I'm using the "IO::Socket" library, but if "Socket" can do it, I'm
> willing to revert to that.
>
> Thanks for your time,
> - Karj.
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to