Documentation ¶
Index ¶
- type Server
- func (server *Server) OnCreate() error
- func (server *Server) OnPeerAdd(peer *gira.Peer)
- func (server *Server) OnPeerDelete(peer *gira.Peer)
- func (server *Server) OnPeerUpdate(peer *gira.Peer)
- func (server *Server) SelectPeer() *Upstream
- func (server *Server) ServeClientStream(client gira.GatewayConn)
- type Upstream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { SessionCount int64 // 会话数量 ConnectionCount int64 // 连接数量 // contains filtered or unexported fields }
func (*Server) OnPeerDelete ¶
func (*Server) OnPeerUpdate ¶
func (*Server) ServeClientStream ¶
func (server *Server) ServeClientStream(client gira.GatewayConn)
客户端流数据 1.处理客户端发过来的第1个消息,必须满足LoginRequest接口 2.验证token 3.验证成功后,创建session,交给session处理接下来的客户端消息
type Upstream ¶
type Upstream struct { Id int32 FullName string Address string // contains filtered or unexported fields }
hall.ctx
| |----ctx--- | |--- upstream ctx
func (*Upstream) HealthCheck ¶
func (*Upstream) NewClientStream ¶
Click to show internal directories.
Click to hide internal directories.