IM/MP/protohuf/mp.im.proto
2023-07-01 20:22:27 +08:00

30 lines
1.1 KiB
Protocol Buffer

syntax = "proto3";
package mp.im;
import "mp.mp.proto";
/// 两个包 使用message_id 保证消息的同步 ***************************************************************////
//************************************/
/***** 只通知id 无论 push pull *****/
/*************************************/
// 推送 [通知包]
message notice { // pull push
uint64 message_id = 1; // 消息id[] 数组 字节序 转成 uint64 用户级id
uint64 time = 2; // 时间 用于消息同步的生命周期
}
// 获取/推送 [消息包] // 通知数据包 拉推包 实际数据包 请求 响应都有
message msg_data {
MP_SUB_TYPE msg_type = 1; // 消息类型 子命令 分辨什么类型的消息 文本 视频 音频?
MP_SUB_TYPE session_type = 2; // 会话 目标/来源 类型 分辨是群消息还是 单体消息
uint64 message_id = 3; // 消息id 字节序 转成 uint64
uint64 time = 4; // 时间
uint64 account = 5; // 消息 目标/来源
string im_msg_data = 6; // 消息数据字节序
}