How to detect if the other end of the TCP connection has gone offline
- From: karjala_lists@xxxxxxxxxxx (Karjala)
- Date: Mon, 31 Oct 2005 15:49:24 +0200
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.
.
- Follow-Ups:
- Re: How to detect if the other end of the TCP connection has gone offline
- From: Bob Showalter
- Re: How to detect if the other end of the TCP connection has gone offline
- From: Jeff Pang
- Re: How to detect if the other end of the TCP connection has gone offline
- Prev by Date: Re: How to change the Owner of a file
- Next by Date: Perl Compile problems..
- Previous by thread: Re: Transforming HoA into AoH
- Next by thread: Re: How to detect if the other end of the TCP connection has gone offline
- Index(es):