Documentation ¶
Index ¶
- type CmdExampleCtxImpl
- func (ctx *CmdExampleCtxImpl) BindUserId(val int64)
- func (ctx *CmdExampleCtxImpl) Disconnect()
- func (ctx *CmdExampleCtxImpl) GetClientIpAddr() string
- func (ctx *CmdExampleCtxImpl) GetUserId() int64
- func (ctx *CmdExampleCtxImpl) LoopReadMsg()
- func (ctx *CmdExampleCtxImpl) LoopSendMsg()
- func (ctx *CmdExampleCtxImpl) SendError(errorCode int, errorInfo string)
- func (ctx *CmdExampleCtxImpl) Write(msgObj protoreflect.ProtoMessage)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmdExampleCtxImpl ¶
type CmdExampleCtxImpl struct { Conn *websocket.Conn SessionId int32 // contains filtered or unexported fields }
CmdExampleCtxImpl 就是 MyCmdContext 的 WebSocket 实现
func (*CmdExampleCtxImpl) BindUserId ¶
func (ctx *CmdExampleCtxImpl) BindUserId(val int64)
func (*CmdExampleCtxImpl) Disconnect ¶
func (ctx *CmdExampleCtxImpl) Disconnect()
func (*CmdExampleCtxImpl) GetClientIpAddr ¶
func (ctx *CmdExampleCtxImpl) GetClientIpAddr() string
func (*CmdExampleCtxImpl) GetUserId ¶
func (ctx *CmdExampleCtxImpl) GetUserId() int64
func (*CmdExampleCtxImpl) LoopReadMsg ¶
func (ctx *CmdExampleCtxImpl) LoopReadMsg()
LoopReadMsg 循环读取消息
func (*CmdExampleCtxImpl) LoopSendMsg ¶
func (ctx *CmdExampleCtxImpl) LoopSendMsg()
LoopSendMsg 循环发送消息
func (*CmdExampleCtxImpl) SendError ¶
func (ctx *CmdExampleCtxImpl) SendError(errorCode int, errorInfo string)
func (*CmdExampleCtxImpl) Write ¶
func (ctx *CmdExampleCtxImpl) Write(msgObj protoreflect.ProtoMessage)
Click to show internal directories.
Click to hide internal directories.