Versions in this module Expand all Collapse all v2 v2.6.0 Jul 29, 2022 v2.0.0 Aug 1, 2022 Changes in this version + var ErrConnectionIsClosed = io.EOF + var ErrListenerIsClosed = io.EOF + var ErrWriteInterrupted = errors.New("only part data was written to socket") + func IsCancelOrCloseError(err error) bool + func IsConnectionBrokenError(err error) bool + func IsIPv6(addr net.IP) bool + func WriteToUDP(conn *net.UDPConn, raddr *net.UDPAddr, b []byte) (int, error) + type Conn struct + func NewConn(c net.Conn) *Conn + func (c *Conn) Close() error + func (c *Conn) Connection() net.Conn + func (c *Conn) LocalAddr() net.Addr + func (c *Conn) ReadFullWithContext(ctx context.Context, buffer []byte) error + func (c *Conn) ReadWithContext(ctx context.Context, buffer []byte) (int, error) + func (c *Conn) RemoteAddr() net.Addr + func (c *Conn) WriteWithContext(ctx context.Context, data []byte) error + type ControlMessage struct + IfIndex int + Src net.IP + type DTLSListener struct + func NewDTLSListener(network string, addr string, dtlsCfg *dtls.Config) (*DTLSListener, error) + func (l *DTLSListener) Accept() (net.Conn, error) + func (l *DTLSListener) AcceptWithContext(ctx context.Context) (net.Conn, error) + func (l *DTLSListener) Addr() net.Addr + func (l *DTLSListener) Close() error + type ErrorsOpt struct + func WithErrors(v func(err error)) ErrorsOpt + type InterfaceError = func(iface *net.Interface, err error) + type MulticastHoplimitOpt struct + type MulticastInterfaceErrorOpt struct + type MulticastInterfaceMode int + const MulticastAllInterface + const MulticastAnyInterface + const MulticastSpecificInterface + type MulticastInterfaceModeOpt struct + type MulticastInterfaceOpt struct + type MulticastOption interface + func WithAllMulticastInterface() MulticastOption + func WithAnyMulticastInterface() MulticastOption + func WithMulticastHoplimit(hoplimit int) MulticastOption + func WithMulticastInterface(iface net.Interface) MulticastOption + func WithMulticastInterfaceError(interfaceError InterfaceError) MulticastOption + func WithMulticastSource(source net.IP) MulticastOption + type MulticastOptions struct + HopLimit int + IFaceMode MulticastInterfaceMode + Iface *net.Interface + InterfaceError InterfaceError + Source *net.IP + func DefaultMulticastOptions() MulticastOptions + func (m *MulticastOptions) Apply(o MulticastOption) + type MulticastSourceOpt struct + type TCPListener struct + func NewTCPListener(network string, addr string) (*TCPListener, error) + func (l *TCPListener) Accept() (net.Conn, error) + func (l *TCPListener) AcceptWithContext(ctx context.Context) (net.Conn, error) + func (l *TCPListener) Addr() net.Addr + func (l *TCPListener) Close() error + type TLSListener struct + func NewTLSListener(network string, addr string, tlsCfg *tls.Config) (*TLSListener, error) + func (l *TLSListener) Accept() (net.Conn, error) + func (l *TLSListener) AcceptWithContext(ctx context.Context) (net.Conn, error) + func (l *TLSListener) Addr() net.Addr + func (l *TLSListener) Close() error + type UDPConn struct + func NewListenUDP(network, addr string, opts ...UDPOption) (*UDPConn, error) + func NewUDPConn(network string, c *net.UDPConn, opts ...UDPOption) *UDPConn + func (c *UDPConn) Close() error + func (c *UDPConn) JoinGroup(ifi *net.Interface, group net.Addr) error + func (c *UDPConn) LeaveGroup(ifi *net.Interface, group net.Addr) error + func (c *UDPConn) LocalAddr() net.Addr + func (c *UDPConn) Network() string + func (c *UDPConn) ReadWithContext(ctx context.Context, buffer []byte) (int, *net.UDPAddr, error) + func (c *UDPConn) RemoteAddr() net.Addr + func (c *UDPConn) SetMulticastLoopback(on bool) error + func (c *UDPConn) WriteMulticast(ctx context.Context, raddr *net.UDPAddr, buffer []byte, ...) error + func (c *UDPConn) WriteWithContext(ctx context.Context, raddr *net.UDPAddr, buffer []byte) error + type UDPOption interface