jonahgrimm has asked for the wisdom of the Perl Monks concerning the following question:
I'm making my first foray into the world of IO::Sockets, and, for the most part, it seems fairly straightforward. The one thing I'm having a bit of trouble with, however, is a test for whether a connection is actually /live/.
A bit of background:
As a pet project, I'm working on a website content aggregator - a very simple thing. Essentially, it's a piece of server code that sits and waits for a query from a simple cgi script, then, in turn, goes out and uses TCP to acquire data from other sites - a 'bot. Fairly simple.
I'm trying to trap the case of 'what happens when that connection is broken, and I need to reconnect before I can actually return data'. Is there a simple test for connectivity I can implement to see if a connection's idled out or otherwise gone stale?
A server reboot, for instance, on the far end, leaves me with a dead connection and no indication that it's dropped.
What's the usual way of monitoring this sort of thing? Grimm
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: An IO::Sockets 'test for live connection' question:
by EvanK (Chaplain) on Mar 01, 2007 at 22:52 UTC | |
by jonahgrimm (Acolyte) on Mar 02, 2007 at 16:30 UTC | |
|
Re: An IO::Sockets 'test for live connection' question:
by zentara (Cardinal) on Mar 02, 2007 at 13:37 UTC | |
|
Re: An IO::Sockets 'test for live connection' question:
by jbert (Priest) on Mar 02, 2007 at 07:52 UTC | |
|
Re: An IO::Sockets 'test for live connection' question:
by djp (Hermit) on Mar 02, 2007 at 06:35 UTC | |
by sgifford (Prior) on Mar 02, 2007 at 06:58 UTC | |
by djp (Hermit) on Mar 06, 2007 at 01:20 UTC | |
|
Re: An IO::Sockets 'test for live connection' question:
by TOD (Friar) on Mar 02, 2007 at 06:50 UTC |