$blocking = $sock->blocking(0) if $timeout;
if (!connect($sock, $addr)) {
- if ($timeout && exists &IO::EINPROGRESS && ($! == &IO::EINPROGRESS)) {
+ if ($timeout && $!{EINPROGRESS}) {
require IO::Select;
my $sel = new IO::Select $sock;
$@ = "connect: timeout";
}
elsif(!connect($sock,$addr) && not $!{EISCONN}) {
- # Some systems (e.g. Digital UNIX/Tru64) fail to
- # re-connect() to an already open socket and set
- # errno to EISCONN (Socket is already connected)
- # for such an attempt.
+ # Some systems refuse to re-connect() to
+ # an already open socket and set errno to EISCONN.
$err = $!;
$@ = "connect: $!";
}
configuration method of the package for that domain, See below.
NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
-
+
As of VERSION 1.18 all IO::Socket objects have autoflush turned on
by default. This was not the case with earlier releases.
new object will be created in the same class as the listen socket, unless
C<PKG> is specified. This object can be used to communicate with the client
that was trying to connect. In a scalar context the new socket is returned,
-or undef upon failure. In an array context a two-element array is returned
+or undef upon failure. In a list context a two-element array is returned
containing the new socket and the peer address; the list will
be empty upon failure.