Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotSocket = errors.New("not a socket")
Functions ¶
This section is empty.
Types ¶
type ProtocolFamily ¶
type ProtocolFamily uint16
const ( Unspecified ProtocolFamily = syscall.AF_UNSPEC Unix ProtocolFamily = syscall.AF_UNIX // Unix domain sockets IPv4 ProtocolFamily = syscall.AF_INET // Internet Protocol v4 IPv6 ProtocolFamily = syscall.AF_INET6 // Internet Protocol v6 )
type SocketInfo ¶
type SocketInfo struct {
// contains filtered or unexported fields
}
func New ¶
func New(fd int) SocketInfo
func (*SocketInfo) Listening ¶
func (s *SocketInfo) Listening() (listening bool, err error)
func (*SocketInfo) Type ¶
func (s *SocketInfo) Type() (st SocketType, err error)
type SocketType ¶
type SocketType uint16
const ( Stream SocketType = syscall.SOCK_STREAM // stream (connection) socket Datagram SocketType = syscall.SOCK_DGRAM // datagram (connection-less) socket Raw SocketType = syscall.SOCK_RAW // raw socket SeqPacket SocketType = syscall.SOCK_SEQPACKET // sequential packet socket )
Click to show internal directories.
Click to hide internal directories.