Versions in this module Expand all Collapse all v1 v1.0.2 May 6, 2023 Changes in this version + type AbstractSession struct + func (s *AbstractSession) GetUserData() any + func (s *AbstractSession) SetUserData(d any) + type Packet struct + Data []byte + Type PacketType + func (p *Packet) ToString() string + type PacketType int + const PacketTypeConnectLost + const PacketTypeConnected + const PacketTypeData + func (p PacketType) ToString() string + type Server interface + Close func() + Open func() error + Write func(*Packet) error + type Session interface + GetAddress func() string + GetUserData func() any + SetUserData func(d any) + Write func(packet *Packet) error + type TcpServer struct + func NewTcpServer(address string) *TcpServer + func (s *TcpServer) Close() + func (s *TcpServer) Open() error + func (s *TcpServer) Write(data *Packet) error + type TcpSession struct + func (s *TcpSession) GetAddress() string + func (s *TcpSession) Write(packet *Packet) error