mirror of
https://github.com/golang/go
synced 2024-11-11 21:40:21 -07:00
net: add note about disabling loopback in ListenMulticastUDP()
Fixes #41752 Change-Id: I83520d2303e5fd2e5f6329f092b40e73c13771a1 Reviewed-on: https://go-review.googlesource.com/c/go/+/271908 Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
parent
7b192f33cf
commit
4f42a9b76b
@ -259,6 +259,9 @@ func ListenUDP(network string, laddr *UDPAddr) (*UDPConn, error) {
|
||||
// ListenMulticastUDP is just for convenience of simple, small
|
||||
// applications. There are golang.org/x/net/ipv4 and
|
||||
// golang.org/x/net/ipv6 packages for general purpose uses.
|
||||
//
|
||||
// Note that ListenMulticastUDP will set the IP_MULTICAST_LOOP socket option
|
||||
// to 0 under IPPROTO_IP, to disable loopback of multicast packets.
|
||||
func ListenMulticastUDP(network string, ifi *Interface, gaddr *UDPAddr) (*UDPConn, error) {
|
||||
switch network {
|
||||
case "udp", "udp4", "udp6":
|
||||
|
Loading…
Reference in New Issue
Block a user