in reply to No data in server file using io::socket

A couple of notes: 1) wog is correct in his changes, but you need to set the socket option SO_REUSEADDR like this
$server = ... setsockopt $server, SOL_SOCKET, SO_REUSEADDR, 1;
or it may be "some time" before the socket is available for reuse. If you are on *NIX see the bind(2) manual. 2) Setting LocalAddr to localhost is probably not what you want. If you want connections from other computers, use INADDR_ANY or just don't set LocalAddr.

HTH, --traveler

Replies are listed 'Best First'.
Re: Re: No data in server file using io::socket
by wog (Curate) on Oct 26, 2001 at 01:31 UTC
    you need to set the socket option SO_REUSEADDR...

    Using the option Reuse => 1 when creating the socket, wilekt is already setting that option.