Versions in this module Expand all Collapse all v0 v0.0.1 Nov 17, 2019 Changes in this version + func SetUDPSocketOptions(conn *net.UDPConn) error + 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) 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 ConnDTLS struct + func NewConnDTLS(conn net.Conn) *ConnDTLS + func (c *ConnDTLS) Close() error + func (c *ConnDTLS) LocalAddr() net.Addr + func (c *ConnDTLS) Read(b []byte) (n int, err error) + func (c *ConnDTLS) RemoteAddr() net.Addr + func (c *ConnDTLS) SetDeadline(t time.Time) error + func (c *ConnDTLS) SetReadDeadline(t time.Time) error + func (c *ConnDTLS) SetWriteDeadline(t time.Time) error + func (c *ConnDTLS) Write(b []byte) (n int, err 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) 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, oob []byte) *ConnUDPContext + func ReadFromSessionUDP(conn *net.UDPConn, b []byte) (int, *ConnUDPContext, error) + func (s *ConnUDPContext) Key() string + func (s *ConnUDPContext) RemoteAddr() net.Addr + 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 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