in reply to How to answer a UDP broadcast
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to answer a UDP broadcast
by mje (Curate) on Jun 19, 2007 at 21:04 UTC |