ListenMulticastUDP doesn't work with

Trying to write some code that listens for UDP broadcasts sent to

I can get equivalent code to work in C, but it fails in Go.

lAddr, err := net.ResolveUDPAddr("udp", "")
if err != nil {

_, err = net.ListenMulticastUDP("udp", nil, lAddr)
if err != nil {

Fails with:
2018/11/14 11:53:28 listen udp bind: cannot assign requested address

Because it seems as if is not a multicast address for go:

Also Wikipedia does not list it as multicast:

Perhaps try to simply listen on that IP in the zero-network?

1 Like

Yep, this is user error. is a broadcast address and not a multi-cast address. Broadcast != multicast :blush:

Appears as if broadcast packets are delivered to any socket that is bound to that port.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.