ctx

package
v0.0.0-...-466c206 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL