I'm using Win 8.1 x64 on two pc's - One works fine. The other never reads
multicast traffic that comes across the wire (wireshark shows the traffic
making it to the pc)

current code:

package main

import (

const (
     ipv4 = ""

func main() {
     fmt.Println("Loading network components")

     group, err := net.ResolveUDPAddr("udp4", ipv4)

     if err != nil {

     //nic,err := net.InterfaceByIndex(0)

     c, err := net.ListenMulticastUDP("udp4", nil, group)
     if err != nil {


     for {
         buff := make([]byte, 4096)
         n, _, err := c.ReadFromUDP(buff)
         if err != nil {

         log.Println("payload received!")

         msg := &dns.Msg{}

symptom: n, _, err := c.ReadFromUDP(buff) blocks, but never receives
traffic/doesn't bind to port

What I've tried: every form of Read on the connection. All block, none
receive. Statically set the network interface to my main nic. My home pc,
which is also Win 8.1 x64 works without issue. I'm hoping it's a setting in
windows, but I've done everything that I can imagine there as well,
verifying that the main nic was highest in the connections list and even
disabling all other network connections. Netstat -a shows that the program
never binds to the port. While the read is blocking, I can enable and
disable Bonjour (runs on the same port) without errors on either programs.

You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupgolang-nuts @
postedFeb 14, '14 at 10:14p
activeFeb 14, '14 at 10:14p

1 user in discussion

Justin Slauson: 1 post



site design / logo © 2023 Grokbase