Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^3: udp broadcast

by haukex (Bishop)
on May 13, 2020 at 09:35 UTC ( #11116746=note: print w/replies, xml ) Need Help??

in reply to Re^2: udp broadcast
in thread udp broadcast

Glad to help!

I'm still confused why this work this way, since 4210 is not the local port, but the broadcast port.

It's the port you're listening on, on the local machine. (The sender is not necessarily sending from their port 4210, they may be sending from a random port, but their packets are addressed to port 4210 on the receiving side. Update: You can see this in the tcpdump output you showed: " >")

BTW, if you want to get the address from which the packet was sent, you can call $sock->peerhost immediately after the recv.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11116746]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2022-05-16 12:55 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (63 votes). Check out past polls.