Documentation ¶
Index ¶
- type DataPack
- type Msg
- type Server
- func (s *Server) AddRouter(msgId byte, router common.IRouter)
- func (s *Server) GetConnMgr() *common.ConnManager
- func (s *Server) ServeWebSocket(w http.ResponseWriter, req *http.Request)
- func (s *Server) SetOnConnStart(hookFunc func(*common.Connection))
- func (s *Server) SetOnConnStop(hookFunc func(*common.Connection))
- func (s *Server) Start()
- func (s *Server) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { ConnMgr *common.ConnManager OnConnStart func(conn *common.Connection) OnConnStop func(conn *common.Connection) // contains filtered or unexported fields }
func NewWebsocket ¶
func NewWebsocket() *Server
func (*Server) GetConnMgr ¶
func (s *Server) GetConnMgr() *common.ConnManager
func (*Server) ServeWebSocket ¶
func (s *Server) ServeWebSocket(w http.ResponseWriter, req *http.Request)
func (*Server) SetOnConnStart ¶
func (s *Server) SetOnConnStart(hookFunc func(*common.Connection))
func (*Server) SetOnConnStop ¶
func (s *Server) SetOnConnStop(hookFunc func(*common.Connection))
Click to show internal directories.
Click to hide internal directories.