You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.0 KiB
Go
47 lines
1.0 KiB
Go
2 years ago
|
package douyu
|
||
|
|
||
|
var _ TypedData = (*MsgLoginReq)(nil)
|
||
|
|
||
|
type (
|
||
|
MsgLoginReq struct {
|
||
|
RoomId int64 `stt:"roomid"` // 直播间ID
|
||
|
//Dfl MsgLoginReqDfl `stt:"dfl"` // 不清楚含义,给默认值
|
||
|
Dfl string `stt:"dfl"`
|
||
|
|
||
|
Username string `stt:"username"` // 用户名,随机生成就好
|
||
|
Uid int64 `stt:"uid"` // 用户ID
|
||
|
Ver string `stt:"ver"` // 版本
|
||
|
AVer string `stt:"aver"` // 另一个版本
|
||
|
Ct int `stt:"ct"` // 客户端类型 通常为0
|
||
|
}
|
||
|
MsgLoginReqDfl struct {
|
||
|
Sn int32 `stt:"sn,omitempty"`
|
||
|
Ss int32 `stt:"ss,omitempty"`
|
||
|
}
|
||
|
)
|
||
|
|
||
|
func (m *MsgLoginReq) DataType() string {
|
||
|
return "loginreq"
|
||
|
}
|
||
|
|
||
|
var _ TypedData = (*MsgJoinGroup)(nil)
|
||
|
|
||
|
type MsgJoinGroup struct {
|
||
|
RoomId int64 `stt:"rid"`
|
||
|
GId int `stt:"gid"`
|
||
|
}
|
||
|
|
||
|
func (m *MsgJoinGroup) DataType() string {
|
||
|
return "joingroup"
|
||
|
}
|
||
|
|
||
|
var _ TypedData = (*MsgHeartbeat)(nil)
|
||
|
|
||
|
// MsgHeartbeat 服务端心跳消息,空消息
|
||
|
type MsgHeartbeat struct {
|
||
|
}
|
||
|
|
||
|
func (m *MsgHeartbeat) DataType() string {
|
||
|
return "mrkl"
|
||
|
}
|