Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// AuthManager
AuthManager *auth.Manager
RateLimiter RateType.RateLimiter
// Port tcp port to listen on
Port string
// Host
Host string
}
Config is base configuration object used by all transports
type ConfigTCP ¶
type ConfigTCP struct {
Scheme string
CertFile string
KeyFile string
// contains filtered or unexported fields
}
ConfigTCP configuration of tcp transport
func NewConfigTCP ¶
NewConfigTCP allocate new transport config for tcp transport Use of this function is preferable instead of direct allocation of ConfigTCP
type ConfigWS ¶
type ConfigWS struct {
// AuthManager
AuthManager *auth.Manager
// CertFile
CertFile string
// KeyFile
KeyFile string
// Path
Path string
// SubProtocols
SubProtocols []string
// contains filtered or unexported fields
}
ConfigWS listener object for websocket server
func NewConfigWS ¶
NewConfigWS allocate new transport config for websocket transport Use of this function is preferable instead of direct allocation of ConfigWS
type InternalConfig ¶
type InternalConfig struct {
// AllowedVersions what protocol version server will handle
// If not set than defaults to 0x3 and 0x04
AllowedVersions map[packet.ProtocolVersion]bool
Sessions *clients.Manager
Metric systree.Metric
// ConnectTimeout The number of seconds to wait for the CONNACK message before disconnecting.
// If not set then default to 2 seconds.
ConnectTimeout int
// KeepAlive The number of seconds to keep the connection live if there's no data.
// If not set then defaults to 5 minutes.
KeepAlive int
}
InternalConfig used by server implementation to configure internal specific needs
type Provider ¶
Provider is interface that all of transports must implement
type TLSConnection ¶ added in v0.0.4
TLSConnection wraps standard tls connection and implements the File function.
type TLSListener ¶ added in v0.0.4
TLSListener wraps standard tls listener.
func NewTLSListener ¶ added in v0.0.4
func NewTLSListener(inner net.Listener, config *tls.Config) *TLSListener