Documentation
¶
Index ¶
- func SetIPv6Only(fd, ipv6only int) error
- func SetKeepAlive(fd, secs int) error
- func SetNoDelay(fd, noDelay int) error
- func SetRecvBuffer(fd, size int) error
- func SetReuseport(fd, reusePort int) error
- func SetSendBuffer(fd, size int) error
- func SockaddrToTCPOrUnixAddr(sa unix.Sockaddr) net.Addr
- func SockaddrToUDPAddr(sa unix.Sockaddr) net.Addr
- func TCPSocket(proto, addr string, sockopts ...Option) (int, net.Addr, error)
- func UDPSocket(proto, addr string, sockopts ...Option) (int, net.Addr, error)
- func UnixSocket(proto, addr string, sockopts ...Option) (int, net.Addr, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetIPv6Only ¶ added in v1.4.4
func SetKeepAlive ¶
SetKeepAlive sets whether the operating system should send keep-alive messages on the connection and sets period between keep-alive's.
func SetNoDelay ¶
SetNoDelay controls whether the operating system should delay packet transmission in hopes of sending fewer packets (Nagle's algorithm).
The default is true (no delay), meaning that data is sent as soon as possible after a Write.
func SetRecvBuffer ¶
SetRecvBuffer sets the size of the operating system's receive buffer associated with the connection.
func SetReuseport ¶
SetReuseport enables SO_REUSEPORT option on socket.
func SetSendBuffer ¶
SetSendBuffer sets the size of the operating system's transmit buffer associated with the connection.
func SockaddrToTCPOrUnixAddr ¶
SockaddrToTCPOrUnixAddr converts a Sockaddr to a net.TCPAddr or net.UnixAddr. Returns nil if conversion fails.
func SockaddrToUDPAddr ¶
SockaddrToUDPAddr converts a Sockaddr to a net.UDPAddr Returns nil if conversion fails.