-
Notifications
You must be signed in to change notification settings - Fork 0
Home
DD edited this page Apr 20, 2018
·
1 revision
Welcome to the Homura wiki!
参数名 | 必选 | 类型 | 说明 |
package length | true | int32 bigendian | 包长度 |
header Length | true | int16 bigendian | 包头长度 |
ver | true | int16 bigendian | 协议版本 |
operation | true | int32 bigendian | 协议指令 |
seq | true | int32 bigendian | 序列号 |
body | false | binary |
|
指令 | 说明 | 消息体 |
2 | 客户端请求心跳 | 空 |
3 | 服务端心跳答复 | 空 |
4 | 上行消息 | 消息 |
5 | 下行消息 | 消息 |
7 | auth认证 | {token:”xxxx”,cid:”xxxx”,rid:”1”} |
8 | auth认证返回 | {“code”:0,”msg”:”鉴权成功”,”gag”:true} |
{
"id": "XXX",//消息ID
"type": "join_group",//消息类型join_group/leave_group
"groupId": "XXXXX",
"fromId": "XXXX",
"ts": 1524215220317 //timestamp
}
{
"id": "XXX",//消息ID
"type": "group_talk",//消息类型
"groupId": "XXXXX",
"fromId": "XXXX",
"msg": "hello world",
"ts": 1524215220317 //timestamp
}
{
"id": "XXX",//消息ID
"type": "talk",//消息类型
"toId": "XXXXX",
"fromId": "XXXX",
"msg": "hello world",
"ts": 1524215220317 //timestamp
}