in reply to Asynchronous HTTP Request using specific ports
I tried and the following example works for me:
Probably it's something specific to your systemuse strict; use warnings; use IO::Socket::INET; my $sock1 = IO::Socket::INET->new( PeerAddr => '127.0.0.1', PeerPort => 7777, LocalPort => 6666, ReuseAddr => 1, ) or die $!; my $sock2 = IO::Socket::INET->new( PeerAddr => '127.0.0.1', PeerPort => 7778, LocalPort => 6666, ReuseAddr => 1, ) or die $!; say $sock1 "foo"; say $sock2 "bar"; sleep 100;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Asynchronous HTTP Request using specific ports
by Adamba (Sexton) on Apr 04, 2013 at 12:09 UTC | |
by zwon (Abbot) on Apr 04, 2013 at 14:08 UTC | |
by Adamba (Sexton) on Apr 04, 2013 at 15:10 UTC | |
by zwon (Abbot) on Apr 04, 2013 at 16:17 UTC | |
by Adamba (Sexton) on Apr 07, 2013 at 07:23 UTC |
In Section
Seekers of Perl Wisdom