How to recieve data from a x.x.x.255 ?
charleypeng opened this issue · comments
i got an error showed that the x.x.x.255:port is not valid , but my udp data is broadcast to the whole network
thanks
I was able to do this using the Node
project, i.e. listening on a private/localhost .255
address:
However running it on the broadcast address of a local network segment, even if running as admin, will not work.
You may be able to accomplish this using IPEndPoint
and UdpClient
directly, though: https://stackoverflow.com/questions/746519/udpclient-receive-on-broadcast-address
If you want to submit a PR with this capability I'd happily take it :)
Cheers, Joel
thanks. i have tested and added a pr.
Thanks @charleypeng - published!
Nuget: https://www.nuget.org/packages/SimpleUdp/1.2.1
Commit: 06877b6