Versions in this module Expand all Collapse all v3 v3.0.1 Dec 12, 2020 v3.0.0 Dec 7, 2020 Changes in this version + const CODE_OK + const CODE_OLD_CLIENT + const CODE_USE_ERROR + func NewAgent(conn network.Conn, connector *Connector) *agent + func NewAgentHandler(a *agent) *agentHandler + type Connector struct + func NewConnector(opts ...Option) *Connector + func (c *Connector) GetSessionMap() *connector.SessionMap + func (c *Connector) OnDestroy() + func (c *Connector) OnInit(server component.ServerImpl) + func (c *Connector) OnRun(closeSig chan bool) + func (c *Connector) Route(f rpc.CustomerRoute) + func (c *Connector) SetConnectionListener(conn connector.Connection) + func (c *Connector) SetHandlerFilter(f filter.Filter) + type Option func(*Options) + func CertFile(f string) Option + func HTTPTimeout(t time.Duration) Option + func HeartbeatTimeout(t time.Duration) Option + func KeyFile(f string) Option + func LenMsgLen(num int) Option + func LittleEndian(littleEndian bool) Option + func MaxConnNum(num int) Option + func MaxMsgLen(length uint32) Option + func TCPAddr(addr string) Option + func WSAddr(addr string) Option + type Options struct + CertFile string + HTTPTimeout time.Duration + HeartbeatTimeout time.Duration + KeyFile string + LenMsgLen int + LittleEndian bool + MaxConnNum int + MaxMsgLen uint32 + TCPAddr string + WSAddr string