Versions in this module Expand all Collapse all v0 v0.0.4 Apr 15, 2024 Changes in this version + const DefaultDelimiter + func Address(host string, port uint16) string + func AppendDelimeter(raw []byte) []byte + func GetIdFromAddr(addr *net.Addr) int + func GetIdFromConn(conn *net.Conn) int + func GetTcpAddress(host string, port uint16) (addr *net.TCPAddr, err error) + func GetUdpAddress(host string, port uint16) (addr *net.UDPAddr, err error) + func GetUnixAddress(host string, port uint16) (addr *net.UnixAddr, err error) + func TruncateDelimeter(raw []byte) []byte + type Event struct + Id int + type EventType int + const CONNECTED + const DISCONNECTED + const ERROR + type EventsToChannel struct + func NewEventsToChannel(messageChannel chan<- Message, eventChannel chan<- Event) *EventsToChannel + func (e2c *EventsToChannel) Connected(id int) + func (e2c *EventsToChannel) Disconnected(id int) + func (e2c *EventsToChannel) Received(id int, message []byte) + type Handler interface + Connected func(id int) + Disconnected func(id int) + Received func(id int, message []byte) + type Message struct + Content []byte + Id int + type Protocol string + const Tcp + const Tls + const Udp + const Unix