in reply to Re: IO::Socket::INET Timeout Issue
in thread IO::Socket::INET Timeout Issue
And then again with Timeout => 0 and Timeout => 120. It was successful on all of them except for Timeout => 120, which it failed to connect (and not after 120 seconds).#!/usr/bin/perl use strict; use IO::Select::INET; my $sock = IO::Select::INET->new( PeerAddr => '(host)', # where host is some host I knew PeerPort => 'ftp(21)', # or http(80) or whatever Proto => 'tcp' ); print defined $sock ? 'Connected!' : $@, "\n"; exit 0;
Might I add to this that the reason IO::Socket::INET is giving for not creating the socket (as returned by $@) is 'IO::Socket::INET: Timeout'. Since I can connect when no Timeout is specified, I think I've at least narrowed it down to a problem within the module and not something en route causing a connection failure.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: IO::Socket::INET Timeout Issue
by Fastolfe (Vicar) on Feb 07, 2001 at 02:54 UTC | |
by Hrunting (Pilgrim) on Feb 07, 2001 at 03:40 UTC |