package
0.0.0-20230902093355-ee071d19ec2c
Repository: https://github.com/yankawayu/go-socket.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
No description provided by the author

# Constants

DiscTypeKickout server use this one to ask the client to disconnect immediately 踢出登录,服务器发给客户端,客户端应立即注销.
DiscTypeNone the default one, sent by the client to close connection 默认类型,客户端发给服务器的时候使用.
MaxPayloadSize Maximum payload size in bytes is 256MB.
All types of message 消息类型.
All types of message 消息类型.
All types of message 消息类型.
All types of message 消息类型.
All types of message 消息类型.
客户端或服务器发消息.
客户端或服务器回复消息.
Notice that this name must be exactly the same as the one in client Or else the server will cut off the connection immediately.
No description provided by the author
RetCodeAccepted Connect successfully 连接成功.
RetCodeAlreadyConnected This happens when the server receives duplicated Connect message 已经连接过了,错误状态,服务器会断开连接.
RetCodeBadLoginInfo There are some problems with login information 登陆信息错误.
RetCodeBadToken There are some problems with token token错误.
RetCodeConcurrentLogin This happens when the server receives two concurrent logins from same user 并发登陆.
RetCodeInvalidUid Uid is invalid uid错误.
RetCodeNotAuthorized The connection hasn't been authorized 未登陆.
RetCodeServerUnavailable Server is currently unavailable 服务器开小差.
RLevelNoReply message that don't need to reply 不需要回复.
RLevelReplyLater message that should be replied after the action 业务逻辑返回后回复.

# Variables

No description provided by the author

# Structs

ConnAck is the message used to respond to Connect message 回复连接消息.
Connect is the message used to build connection 连接消息.
Disconnect is the message used to close the connection 断开连接.
FixHeader is the fixed length header in front of each message.
MessageErr wraps an error that caused a problem that needs to bail out of the API, such that errors can be recovered and returned as errors from the public API.
MessageManager is the class used to decode and encode messages.
PingReq is the message used to keep the connection alive 心跳包.
PingResp is the message used to respond to PingReq 心跳回应包.
No description provided by the author
SendReq is the message used as request 发送消息.
SendResp is the message used as response for SendReq 发送消息回执.

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author