Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Simple UDP example anyone?

by Chmrr (Vicar)
on Dec 05, 2001 at 12:54 UTC ( #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
Node Status?
node history
Node Type: note [id://129553]
help
Chatterbox?
[LanX]: there was a guy who tried to steal the concept and build an own monastery ...
[LanX]: yeah PM is very emacsy ;-)
[LanX]: I think tobyink was on a good track with his redesign, pitty the pmdevs/gods didn't try to continue the approach of a modern responsive design
[holli]: *sigh* why has there to be drama in such a thread?
[LanX]: ?
[holli]: Re^2: Let's Make PerlMonks Great Again! -- suggestions and dreams - STFU and write code already (start already)

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2017-11-20 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (292 votes). Check out past polls.

    Notices?