Skip to content

Commit

Permalink
chore: fix some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
panjf2000 committed Nov 19, 2022
1 parent ad9986e commit 5010288
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/socket/sockopts_posix.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ import (
"os"
"syscall"

"github.com/panjf2000/gnet/v2/pkg/errors"
"golang.org/x/sys/unix"

"github.com/panjf2000/gnet/v2/pkg/errors"
)

// SetNoDelay controls whether the operating system should delay
Expand Down Expand Up @@ -108,7 +109,7 @@ func SetMulticastMembership(proto string, udpAddr *net.UDPAddr) func(int, int) e
}
}

// SetIPv4MulticastMemership joins fd to the specified multicast IPv4 address.
// SetIPv4MulticastMembership joins fd to the specified multicast IPv4 address.
// ifIndex is the index of the interface where the multicast datagrams will be
// received. If ifIndex is 0 then the operating system will choose the default,
// it is usually needed when the host has multiple network interfaces configured.
Expand All @@ -135,7 +136,7 @@ func SetIPv4MulticastMembership(fd int, mcast net.IP, ifIndex int) error {
return os.NewSyscallError("setsockopt", unix.SetsockoptIPMreq(fd, syscall.IPPROTO_IP, syscall.IP_ADD_MEMBERSHIP, mreq))
}

// SetIPv6MulticastMemership joins fd to the specified multicast IPv6 address.
// SetIPv6MulticastMembership joins fd to the specified multicast IPv6 address.
// ifIndex is the index of the interface where the multicast datagrams will be
// received. If ifIndex is 0 then the operating system will choose the default,
// it is usually needed when the host has multiple network interfaces configured.
Expand Down

0 comments on commit 5010288

Please sign in to comment.