Versions in this module Expand all Collapse all v0 v0.1.2 Apr 30, 2020 v0.1.1 Apr 12, 2020 Changes in this version + const ErrServerClosed + func WriteToSessionUDP(conn *net.UDPConn, session *ConnUDPContext, b []byte) (int, error) + type Conn struct + func NewConn(c net.Conn, heartBeat time.Duration) *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 ConnUDP struct + func NewConnUDP(c *net.UDPConn, heartBeat time.Duration, multicastHopLimit int, ...) *ConnUDP + func (c *ConnUDP) Close() error + func (c *ConnUDP) JoinGroup(ifi *net.Interface, group net.Addr) error + func (c *ConnUDP) LeaveGroup(ifi *net.Interface, group net.Addr) error + func (c *ConnUDP) LocalAddr() net.Addr + func (c *ConnUDP) ReadWithContext(ctx context.Context, buffer []byte) (int, *ConnUDPContext, error) + func (c *ConnUDP) RemoteAddr() net.Addr + func (c *ConnUDP) SetMulticastLoopback(on bool) error + func (c *ConnUDP) WriteWithContext(ctx context.Context, udpCtx *ConnUDPContext, buffer []byte) error + type ConnUDPContext struct + func NewConnUDPContext(raddr *net.UDPAddr) *ConnUDPContext + func ReadFromSessionUDP(conn *net.UDPConn, b []byte) (int, *ConnUDPContext, error) + func (s *ConnUDPContext) Key() string + func (s *ConnUDPContext) RemoteAddr() net.Addr + type ControlMessage struct + IfIndex int + Src net.IP + type DTLSListener struct + func NewDTLSListener(network string, addr string, cfg *dtls.Config, heartBeat time.Duration) (*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 + func (l *DTLSListener) SetDeadline(t time.Time) error + type Error string + func (e Error) Error() string + type TCPListener struct + func NewTCPListener(network string, addr string, heartBeat time.Duration) (*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 + func (l *TCPListener) SetDeadline(t time.Time) error + type TLSListener struct + func NewTLSListener(network string, addr string, cfg *tls.Config, heartBeat time.Duration) (*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 + func (l *TLSListener) SetDeadline(t time.Time) error