Documentation ¶
Index ¶
- type Client
- type Conn
- type Mgr
- func (p *Mgr) Close()
- func (p *Mgr) GetSession(sesID int32) (Session, bool)
- func (p *Mgr) ListenAddr() *net.TCPAddr
- func (p *Mgr) Post(f func())
- func (p *Mgr) RegisterEvent(onNew, onClose func(conn Session))
- func (p *Mgr) RegisterRawSessionMsgHandler(msg proto.Message, handler MsgHandler)
- func (p *Mgr) RegisterSessionMsgHandler(cb interface{})
- func (p *Mgr) Run()
- type MsgHandler
- type MsgInfo
- type Processor
- func (p *Processor) Encode(msgID uint32, data []byte) []byte
- func (p *Processor) Handle(msg proto.Message, client Session) error
- func (p *Processor) Marshal(msg proto.Message) ([]byte, error)
- func (p *Processor) RegisterSessionMsgHandler(msg proto.Message, handler MsgHandler)
- func (p *Processor) SetByteOrder(littleEndian bool)
- func (p *Processor) Unmarshal(data []byte) (proto.Message, error)
- type Session
- type WSConn
- type WSServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) SendRawMsg ¶
type Mgr ¶
type Mgr struct {
// contains filtered or unexported fields
}
func (*Mgr) ListenAddr ¶ added in v0.0.4
func (*Mgr) RegisterEvent ¶
func (*Mgr) RegisterRawSessionMsgHandler ¶
func (p *Mgr) RegisterRawSessionMsgHandler(msg proto.Message, handler MsgHandler)
func (*Mgr) RegisterSessionMsgHandler ¶
func (p *Mgr) RegisterSessionMsgHandler(cb interface{})
type MsgHandler ¶
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func NewProcessor ¶
func NewProcessor() *Processor
func (*Processor) RegisterSessionMsgHandler ¶
func (p *Processor) RegisterSessionMsgHandler(msg proto.Message, handler MsgHandler)
func (*Processor) SetByteOrder ¶
type WSConn ¶
func (*WSConn) RemoteAddr ¶
type WSServer ¶
func (*WSServer) ListenAddr ¶ added in v0.0.4
Click to show internal directories.
Click to hide internal directories.