# Functions
Accept wrapper around the accept system call that marks the returned file descriptor as close-on-exec.
AddrToSockAddr convert net addr to sockAddr.
BigToLittleEndian converts Big-Endian to Little-Endian.
DupFD duplicates file descriptor and returns the new fd.
GetFD returns the integer Unix file descriptor referencing the tcp/udp socket.
IP6ZoneToString converts an IP6 Zone unix int to a net string.
LittleToBigEndian converts Little-Endian to Big-Endian.
SetKeepAlive turns on keep-alive option for fd and sets the keep-alive interval.
SockaddrSliceToUDPAddr converts sockaddr byte slice to net.Addr.
SockaddrToTCPOrUnixAddr converts a Sockaddr to a net.TCPAddr or net.UnixAddr.
SockaddrToUDPAddr converts a Sockaddr to a net.UDPAddr.
StringToZoneID converts a IPv6 zone string to Zone unix int.
TestableNetwork checks whether the network is testable, only used for unit test.
UDPAddrToSockaddrSlice converts net.UDPAddr struct to sockaddr byte slice.
UnixSockaddrToSockaddrSlice converts unix.Sockaddr to sockaddr byte slice.
ValidateTCP validates that listener is listening on TCP.
ValidateUDP validates that conn is listening on UDP.
# Constants
SockaddrSize is the size of socket address, it use size of IPv6 socket address for compatibility because IPv6 socket address is longer than IPv4.