Versions in this module Expand all Collapse all v1 v1.2.2 May 20, 2020 v1.1.0 May 17, 2020 Changes in this version + var ErrConnClosing = errors.New("use of closed network connection") + var ErrReadBlocking = errors.New("read packet was blocking") + var ErrWriteBlocking = errors.New("write packet was blocking") + type Config struct + PacketReceiveChanLimit uint32 + PacketSendChanLimit uint32 + type Conn struct + func (c *Conn) AsyncWritePacket(p Packet, timeout time.Duration) (err error) + func (c *Conn) Close() + func (c *Conn) Do() + func (c *Conn) GetExtraData() interface{} + func (c *Conn) GetRawConn() *net.TCPConn + func (c *Conn) IsClosed() bool + func (c *Conn) PutExtraData(data interface{}) + type ConnCallback interface + OnClose func(*Conn) + OnConnect func(*Conn) bool + OnMessage func(*Conn, Packet) bool + type Packet interface + Serialize func() []byte + type Protocol interface + ReadPacket func(conn *net.TCPConn) (Packet, error) + type Server struct + func NewServer(config *Config, callback ConnCallback, protocol Protocol) *Server + func (s *Server) Start(listener *net.TCPListener, acceptTimeout time.Duration) + func (s *Server) Stop() Incompatible versions in this module v2.1.0+incompatible May 20, 2020