DTOakey has asked for the wisdom of the Perl Monks concerning the following question:
I am a self taught Perl novice, trying to use IO::Socket on a Windows 2000 server. (I know, I know... let the flames begin...) My code works, but I am limited by a system or stack "default" Timeout setting. Apparently, there is a bug in the Windows version of IO::Socket::INET, to the point where the Timeout property is commented out.
I have even attempted to write code which does not use the ::INET portion of the module, but I still can't seem to implement a Timeout. The "default" timeout that is applied to my program is 23 seconds (go figure). I need something as small as 2 or 3 seconds.
Additionally, I can't seem to find the property for "connected", when just using IO::Socket. So, now I'm really stuck - no Timeout value, AND no "am I connected?" return.
I need to make a Client connection to an established Server, to verify that the Server (TCP port) is running.
I am in a crunch for a resolution to this. Any and All help is greatly appreciated. Thank you!
My last attempt at creating the Socket is like so:
use IO::Socket; $server = new IO::Socket; $proto = getprotobyname('tcp'); $server->socket(PF_INET, SOCK_STREAM, $proto); $internet_addr = inet_aton($myIPaddress); $paddr = sockaddr_in(135, $internet_addr);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Seeking IO::Socket Advice
by pg (Canon) on Nov 18, 2003 at 17:29 UTC | |
|
Re: Seeking IO::Socket Advice
by ptkdb (Monk) on Nov 18, 2003 at 17:21 UTC | |
|
Re: Seeking IO::Socket Advice
by DTOakey (Initiate) on Nov 18, 2003 at 20:19 UTC | |
|
Re: Seeking IO::Socket Advice
by hanenkamp (Pilgrim) on Nov 18, 2003 at 17:56 UTC |