in reply to Re^2: Timeout for an established connection
in thread Timeout for an established connection
I thought I did. :-) IO::Select can be used to set a timeout on reading a socket filehandle. Why aren't you using it? I thought it was in one of the links I listed above.
FWIW, the method which I found to be workable, comes from the way event-loop systems, like Glib or AnyEvent does it. In those systems, when you you get the meta data from the socket connection that an 'IN' condition has occured, but yet there is no data there to be read, then your connection is caput. See Gtk2 server and client GUI's with root messaging for an example.
Also see blocking, non-blocking, and semi-blocking, and Knowing when a socket connection is dead for more Select ideas.
Sorry if I didn't read your question closely enough, but I can't see why select is out of the universe of possible solutions for you. In any event, have a happy new years eve. :-)
I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Timeout for an established connection
by 0day (Sexton) on Jan 01, 2013 at 11:35 UTC |