Hello all,

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);

In reply to Seeking IO::Socket Advice by DTOakey

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.