package constants // 消息类型 type MessageFrameType uint8 const ( FrameData MessageFrameType = 0x0 // 消息内容 FramePing MessageFrameType = 0x1 // 心跳ping FrameErr MessageFrameType = 0x9 // 错误信息 FrameAck MessageFrameType = 0x2 // ack确认消息 FrameNoAck MessageFrameType = 0x3 // 不需要ack确认的 ) type ChatType int const ( GroupChatType ChatType = iota + 1 // 群聊 SingleChatType // 私聊 )