in reply to udp broadcast
I think you don't need to set up all those options the way you did, the following is enough for me to recieve UDP broadcasts.
use IO::Socket::INET; my $sock = IO::Socket::INET->new( Proto => 'udp', LocalPort => 4210 ); $sock->recv(my $data, 100) or die $!; print "<<$data>>\n";
Test via echo "Hello World" | socat - UDP-DATAGRAM:255.255.255.255:4210,broadcast
Of course, if you've got a firewall, it has to allow incoming UDP packets on that port.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: udp broadcast
by oha (Friar) on May 13, 2020 at 09:26 UTC | |
by haukex (Archbishop) on May 13, 2020 at 09:35 UTC |