Perl: the Markov chain saw | |
PerlMonks |
UDP broadcast using IO::Socket under Linuxby Tardis (Pilgrim) |
on Jan 28, 2003 at 02:40 UTC ( [id://230464]=perlquestion: print w/replies, xml ) | Need Help?? |
Tardis has asked for the wisdom of the Perl Monks concerning the following question:
Hello, I am writing a small Perl/TK app, which communicates with other instances of itself on a LAN (think a sort of Instant Messaging application). This snippet of code works under FreeBSD, but not under Linux:
Running under FreeBSD works (as verified with a tcpdump process), running under Linux gives a:
I was given the two options to set on the socket (via 'sockopt') by a C programmer - the 'SO_DONTROUTE' doesn't seem to be necessary. Turning it on does not make it work under Linux. The 'SO_BROADCAST' is 100% necessary for it to work at all under FreeBSD.Creating socket: Permission denied Yes, I really want to use UDP broadcasts. Suggestions I use unicast addresses will be cheerfully ignored :-) Oh, and although it would be totally unsuitable for my application, I did try running it as root. It made no difference.
Back to
Seekers of Perl Wisdom
|
|