Versions in this module Expand all Collapse all v0 v0.1.0 Nov 19, 2022 Changes in this version + var HeaderMinLength = 0 + var UDPHeaderMinLength = 0 + func DialTCP(config interface{}, fc conn.FRecvChan) (conn.Connection, error) + func DialUDP(config interface{}, fc conn.FRecvChan) (conn.Connection, error) + func NewTCPListener(oc interface{}) (conn.Listener, error) + func NewUDPListener(oc interface{}) (conn.Listener, error) + type TCPConfig struct + BufferLength int + DialTimeoutMS int + ListenAddress string + WriteTimeoutMS int + func DefaultTCPConfig() *TCPConfig + type TCPConnection struct + func (c *TCPConnection) BindOwner(o conn.ConnectionOwner) + func (c *TCPConnection) Close() + func (c *TCPConnection) ConfoundCode() []byte + func (c *TCPConnection) Done() <-chan struct{} + func (c *TCPConnection) Owner() conn.ConnectionOwner + func (c *TCPConnection) RecvChan() <-chan *protocol.Packet + func (c *TCPConnection) Remote() net.Addr + func (c *TCPConnection) Send(pac *protocol.Packet) error + func (c *TCPConnection) SetConfoundCode(code []byte) + func (c *TCPConnection) Start(s *conn.Sender) error + type TCPListener struct + func (lis *TCPListener) Accept(fc conn.FRecvChan) (conn.Connection, error) + func (lis *TCPListener) Addr() net.Addr + func (lis *TCPListener) Close() + type UDPConfig struct + ActiveTimeoutMS int + DialTimeoutMS int + ListenAddress string + MTUBufferLength int + ReceiveGoNum int + SignCode string + func DefaultUDPConfig() *UDPConfig + type UDPConnection struct + func (c *UDPConnection) BindOwner(o conn.ConnectionOwner) + func (c *UDPConnection) Close() + func (c *UDPConnection) ConfoundCode() []byte + func (c *UDPConnection) Done() <-chan struct{} + func (c *UDPConnection) Owner() conn.ConnectionOwner + func (c *UDPConnection) RecvChan() <-chan *protocol.Packet + func (c *UDPConnection) Remote() net.Addr + func (c *UDPConnection) Send(pac *protocol.Packet) error + func (c *UDPConnection) SetConfoundCode(code []byte) + func (c *UDPConnection) Start(s *conn.Sender) error + type UDPListener struct + func (lis *UDPListener) Accept(fc conn.FRecvChan) (conn.Connection, error) + func (lis *UDPListener) Addr() net.Addr + func (lis *UDPListener) Close()