jepri has asked for the wisdom of the Perl Monks concerning the following question:
Forking isn't really an option, because some of the computers I"m connecting to will boot me after relatively short timeouts.
Essentially I want some code like this:
my @sockets; foreach ( @hosts ) { push @sockets, IO::Socket->new(blah blah blah); } while ( 1 ) { foreach ( @sockets ) { if ( $_->exists && $_->is_open) { do_stuff($_); } } }
Does anyone know of a solution?
____________________
Jeremy
I didn't believe in evil until I dated it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Non blocking socket open
by tadman (Prior) on Jun 29, 2001 at 12:06 UTC | |
by jepri (Parson) on Jun 29, 2001 at 12:35 UTC | |
by John M. Dlugosz (Monsignor) on Jun 29, 2001 at 18:19 UTC | |
by tye (Sage) on Jun 29, 2001 at 20:22 UTC | |
by MeowChow (Vicar) on Jun 30, 2001 at 10:21 UTC | |
|
Re: Non blocking socket open
by Rudif (Hermit) on Jun 29, 2001 at 22:00 UTC |