First off, I'm going to go out on a limb and guess that this is some DOS based system. There are numerous problems with running perl on this platform, and one of which is open file handles. Windows9x has limitations to the number of handles it can have open at any one particular time. If there are two many open, then you will not be able to get any more until system resources are free. Handles in Win32 can count as: I'm not sure exactly what the upper limit is, but it seems that you are hitting it. You may need to make a few tweaks to get this to run. It is quite possible that with all the junk you have running, perl does not have the space to create file handles. Perl has to open a lot of files to get a program up and running, and that may be an issue. If you are using C, all you have to do is open up one file, and launch a socket.

Here are my suggestions on getting it to run. First off, make sure that you have a working IO::Socket program. You didn't post any here, so I'm assuming you have one that works. Here's a really quick and dirty one that doesn't want to do anything complicated.
#!/usr/bin/perl -w use strict; use IO::Socket; my $sock = IO::Socket::INET->new(PeerAddr => 'www.perlmonks.org', PeerPort => 'http(80)', Proto => 'tcp') or die "Ack! No so +cket!"; $sock->write("GET /\r\n\r\n"); my $foo; $sock->read($foo, 1000000); print $foo."\n";
Okay, does that run? If it does, than you're hitting the upper limit on complexity in the program. Here are my suggestions if it doesn't: It's a tough problem if Windows is going to cough at you, but it's quite possibly Novell or the Anti-Virus's part. Reboot the box and see if it works after a cold reboot.

    --jb

In reply to Re: Socket problems under Windows by JayBonci
in thread Socket problems under Windows by blogan

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.