Files
mayfly-go/server/pkg/ws/msg.go

19 lines
226 B
Go
Raw Normal View History

package ws
2023-09-12 20:54:07 +08:00
// 消息类型
type MsgType uint8
2023-09-12 20:54:07 +08:00
const (
JsonMsg MsgType = 1
TextMsg MsgType = 2
BinaryMsg MsgType = 3
)
// 消息信息
type Msg struct {
2023-09-12 20:54:07 +08:00
ToUserId UserId
Data any
Type MsgType // 消息类型
}