Documentation
¶
Index ¶
- func Dup(fd int) (nfd int, err error)
- func DupNetConn(conn net.Conn) (int, error)
- func SetIPv6Only(fd, ipv6only int) error
- func SetKeepAlive(fd int, keepalive bool) error
- func SetKeepAlivePeriod(fd int, secs int) error
- func SetLinger(fd, secs int) error
- func SetNoDelay(fd int, nodelay bool) error
- func SetNonblock(fd int, nonblocking bool) error
- func SetRecvBuffer(fd, size int) error
- func SetReuseAddr(fd, reuseAddr int) error
- func SetSendBuffer(fd, size int) error
- func SockaddrToAddr(sa syscall.Sockaddr, udpAddr bool) net.Addr
- func Writev(fd int, iov [][]byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetIPv6Only ¶
SetIPv6Only restricts a IPv6 socket to only process IPv6 requests or both IPv4 and IPv6 requests.
func SetKeepAlive ¶
SetKeepAlive sets whether the operating system should send keep-alive messages on the connection.
func SetKeepAlivePeriod ¶
SetKeepAlivePeriod sets period between keep-alives.
func SetLinger ¶
SetLinger sets the behavior of Close on a connection which still has data waiting to be sent or to be acknowledged.
If sec < 0 (the default), the operating system finishes sending the data in the background.
If sec == 0, the operating system discards any unsent or unacknowledged data.
If sec > 0, the data is sent in the background as with sec < 0. On some operating systems after sec seconds have elapsed any remaining unsent data may be discarded.
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 SetNonblock ¶
SetNonblock set this socket to use non-blocking mode or block mode.
func SetRecvBuffer ¶
SetRecvBuffer sets the size of the operating system's receive buffer associated with the connection.
func SetReuseAddr ¶
SetReuseAddr enables SO_REUSEADDR option on socket.
func SetSendBuffer ¶
SetSendBuffer sets the size of the operating system's transmit buffer associated with the connection.
func SockaddrToAddr ¶
SockaddrToAddr returns a go/net friendly address
Types ¶
This section is empty.