I wrote a library (schollz/peerdiscovery 
<https://github.com/schollz/peerdiscovery>) for discovering peers on a 
local network. I've tested it between a wireless ubuntu laptop and a wired 
ubuntu server and it works great.

Basically you can run the following on computer 1 and computer 2:


go get github.com/schollz/peerdiscovery
cd $GOPATH/src/github.com/schollz/peerdiscovery/examples
go run broadcast.go


After both are run, both computers will discover each other and the 
associated payload (in the example its a random payload), and they will 
output something like:


2018/04/22 23:59:11 discovered ip '192.168.XX.XX' with payload 'YY'


But...*this doesn't work on Windows*! I have no idea why. If one of the 
computers is a Windows computer there is no activity, and no errors. I put 
in logging and found that Windows will get to the ReadFromUDP(buffer) and 
then it is unable to read anything, ever and its sent packets aren't 
reaching the other computers.

Is this a Windows firewall issue? Or something else? I'd love to hear any 
advice, thanks! For the record, I'm using go1.10 on all computers. 

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to