in reply to LWP and LocalIP/LocalPort
@LWP::Protocol::http::EXTRA_SOCK_OPTS = ( LocalAddr => '1.2.3.4', Loca +lPort => '8080' );
local($^W) = 0; # IO::Socket::INET can be noisy my $sock = $self->socket_class->new(PeerAddr => $host, PeerPort => $port, Proto => 'tcp', Timeout => $timeout, KeepAlive => !!$conn_cache, SendTE => 1, $self->_extra_sock_opts($host, $po +rt), );
This allows for any of the default options of the IO::Socket::INET class to be re-defined as required.
perl -e 'print+unpack("N",pack("B32","00000000000000000000000111010001")),"\n"'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: LWP and LocalIP/LocalPort
by jj808 (Hermit) on Oct 16, 2002 at 14:26 UTC |