|P is for Practical|
UDP-Broadcast with socketby strat (Canon)
|on Jan 12, 2009 at 17:19 UTC ( #735745=perlquestion: print w/replies, xml )||Need Help??|
strat has asked for the wisdom of the Perl Monks concerning the following question:
Update: added client script, changed INADDR_BROADCAST to INADDR_ANY for server (thanks @ikegami)
a friend of mine asked me how UDP-Broadcasts with Socket worked. I hardly know anything about UDP, but I tried to learn a little bit about and wrote the following two pieces of code:server.pl
But the server waits forever, it doesn't get any message from client.pl. I started the scripts on the same PC, an OpenSuse 10.3 Linux with perl5.8.
Please, can you give me a hint what I'm doing wrong? I searched perlmonks and google, but couldn't find anything helpful.
Back to Seekers of Perl Wisdom