S
Steve Roscio
Howdy -
Is there a way to do an asynchronous connection of a TCP socket, without
threads or forking? Something like a two-step method, where I start the
connect, then later check to see if it's done and if it worked?
So basically I want to turn this:
my $s = IO::Socket::INET->new(
Proto => $proto,
PeerAddr => $addr,
PeerPort => $port,
# Blocking => 0,
Timeout => $timeout,
);
into a two-step call:
my $s = start_connection (...);
# later...
if ($s->connected() || $s->error()) ... #(whatever)
Thanx!
- Steve
Is there a way to do an asynchronous connection of a TCP socket, without
threads or forking? Something like a two-step method, where I start the
connect, then later check to see if it's done and if it worked?
So basically I want to turn this:
my $s = IO::Socket::INET->new(
Proto => $proto,
PeerAddr => $addr,
PeerPort => $port,
# Blocking => 0,
Timeout => $timeout,
);
into a two-step call:
my $s = start_connection (...);
# later...
if ($s->connected() || $s->error()) ... #(whatever)
Thanx!
- Steve