A couple of notes:
$socket->peername makes no sense when using UPD. UPD sockets aren't connected, so they don't have a peer. The address of the sender is packet-specific, which is why recv returns it. $socket->peername should be replaced with $ip.
Proto => 'udp' and Type => SOCK_DGRAM are redundant. They both mean the same thing. Either one will do. Currently, one of them is silently being ignored.
In reply to Re: How to answer a UDP broadcast
by ikegami
in thread How to answer a UDP broadcast
by mje
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |