Delfer has asked for the wisdom of the Perl Monks concerning the following question:

I use IO::Socket::INET to make a HTTP service.
I think my program is well when the port is not busy.
It wait for requests then accept and process them normally.
But when I test it(I send http request very fast to that
port),the program was broken!
These are the error reports:
"Bad arg length for Socket::unpack_sockaddr_in, length is 0,
should be 16 at /usr/lib/perl5/5.00503/i386-linux/Socket.pm
line 295, <GEN58> chunk 11."
I think this is not my program's fault.How do you think
about it?Give me some advices please.Many many thanks.

Replies are listed 'Best First'.
Re: help me!
by chromatic (Archbishop) on May 19, 2000 at 23:12 UTC
    Unless you have a very compelling reason to stick with IO::Socket modules, have a look at HTTP::Daemon in the LWP Bundle. I moved to that and things are much, much easier.

    If you're supremely curious, have a look at some example code for how we've set things up.

Re: help me!
by c-era (Curate) on May 19, 2000 at 22:16 UTC
    A couple of things;
    1. Could you post some of your code
    2. What version of perl are you running
    3. Is your copy of Socket.pm corrupt, and what version are you running
    4. What are you using to send http requests
    5. Are you sending the requests from the same box or another box

    P.S. Please use a more descriptive title.