mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00: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
1 changed files with 3 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue