udp port

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
# this works

my $sock = IO::Socket::INET->new(PeerAddr => '',
                                  PeerPort => 161,
                                  Proto    => 'udp') || die;
if (send($sock, "ping", 0)) { print "ok\n" }

# this is not . do you know why ?

$p = Net::Ping->new('udp', 2); # icmp udp tcp syn
print 'ok' if $p->ping('');

Re: udp port

On 7/9/2015 01:22, George Mpouras wrote:
Quoted text here. Click to load it

The only thing obvious is that IO::Socket code stops at the send;
whereas the Net::Ping code goes on and waits for a response from
a recv after getting a good send.

Site Timeline