Update README.md (#21)

update doc on windows support
This commit is contained in:
mapl 2018-08-29 19:10:52 +02:00 committed by Cameron Sparr
parent 416e72114c
commit 68a45b48a0

View File

@ -78,5 +78,10 @@ use setcap to allow your binary using go-ping to bind to raw sockets
setcap cap_net_raw=+ep /bin/goping-binary
```
## Note on Windows Support:
You have to use "SetPrivileged(true)" like "pinger.SetPrivileged(true)", otherwise you will receive an error:
"Error listening for ICMP packets: socket: The requested protocol has not been configured into the system, or no implementation for it exists." This even works without admin privileges. Tested on Windows 10
See [this blog](https://sturmflut.github.io/linux/ubuntu/2015/01/17/unprivileged-icmp-sockets-on-linux/)
and [the Go icmp library](https://godoc.org/golang.org/x/net/icmp) for more details.