jchristn / SimpleUdp

SimpleUdp is a super simple way of building UDP clients and servers in C#.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

image

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.