Versions in this module Expand all Collapse all v1 v1.2.3 Dec 10, 2022 Changes in this version + var ErrInvalidMessage = errors.New("message type not binary") + func MockCloser(id string) + func MockEstablisher(id string, c net.Conn, ac auth.Controller) error + type CloseFunc func(id string) + type Config struct + Auth auth.Controller + TLS *TLS + TLSConfig *tls.Config + type EstablishFunc func(id string, c net.Conn, ac auth.Controller) error + type HTTPStats struct + func NewH(id, address string, ...) *HTTPStats + func NewHTTPStats(id, address string) *HTTPStats + func (l *HTTPStats) Close(closeClients CloseFunc) + func (l *HTTPStats) ID() string + func (l *HTTPStats) Listen(s *system.Info) error + func (l *HTTPStats) Serve(establish EstablishFunc) + func (l *HTTPStats) SetConfig(config *Config) + type Listener interface + Close func(CloseFunc) + ID func() string + Listen func(s *system.Info) error + Serve func(EstablishFunc) + SetConfig func(*Config) + type Listeners struct + func New(s *system.Info) *Listeners + func (l *Listeners) Add(val Listener) + func (l *Listeners) Close(id string, closer CloseFunc) + func (l *Listeners) CloseAll(closer CloseFunc) + func (l *Listeners) Delete(id string) + func (l *Listeners) Get(id string) (Listener, bool) + func (l *Listeners) Len() int + func (l *Listeners) Serve(id string, establisher EstablishFunc) + func (l *Listeners) ServeAll(establisher EstablishFunc) + type MockListener struct + Config *Config + ErrListen bool + Listening bool + Serving bool + func NewMockListener(id, address string) *MockListener + func (l *MockListener) Close(closer CloseFunc) + func (l *MockListener) ID() string + func (l *MockListener) IsListening() bool + func (l *MockListener) IsServing() bool + func (l *MockListener) Listen(s *system.Info) error + func (l *MockListener) Serve(establisher EstablishFunc) + func (l *MockListener) SetConfig(config *Config) + type TCP struct + func NewT(id, address string, ctl auth.Controller) *TCP + func NewTCP(id, address string) *TCP + func (l *TCP) Close(closeClients CloseFunc) + func (l *TCP) ID() string + func (l *TCP) Listen(s *system.Info) error + func (l *TCP) Serve(establish EstablishFunc) + func (l *TCP) SetConfig(config *Config) + type TLS struct + Certificate []byte + PrivateKey []byte + type Websocket struct + func NewW(id, address string, ctl auth.Controller) *Websocket + func NewWebsocket(id, address string) *Websocket + func (l *Websocket) Close(closeClients CloseFunc) + func (l *Websocket) ID() string + func (l *Websocket) Listen(s *system.Info) error + func (l *Websocket) Serve(establish EstablishFunc) + func (l *Websocket) SetConfig(config *Config)