Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Simple UDP example anyone?

by Chmrr (Vicar)
on Dec 05, 2001 at 12:54 UTC ( [id://129553]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    $|++;
    use strict;
    ...
    my ($datagram,$flags);
    $response->recv($datagram,42,$flags);
    print "Got message from ", $response->peerhost,", flags ",$flags || "n
    +one",": $datagram\n";
    
  2. or download this
    #!/usr/bin/perl -w
    $|++;
    use strict;
    ...
      my $response = IO::Socket::INET->new(Proto=>"udp",PeerHost=>$ipaddr,
    +PeerPort=>2424);
      $response->send("PONG!");
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://129553]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2024-04-19 01:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found