Explorar o código

添加用户之间的实时消息接口

王虎 %!s(int64=3) %!d(string=hai) anos
pai
achega
75394cd0e8
Modificáronse 2 ficheiros con 19 adicións e 0 borrados
  1. 3 0
      README.md
  2. 16 0
      protos/sync.proto

+ 3 - 0
README.md

@@ -65,5 +65,8 @@
 | 157 | MasterStoreNotify | c -> s | master存储状态 |
 | 158 | MasterLoadRequest | c -> s | master读取状态 |
 | 159 | MasterLoadResponse | s -> c | 服务器响应master状态 |
+| 160 | DMessageRequest | c -> s | 客户端发送消息给其他人 |
+| 161 | DMessageResponse | s -> c | 服务端响应协议结果 |
+| 162 | DMessagePush | s -> c | 服务端转发消息给其他人 |
 
 

+ 16 - 0
protos/sync.proto

@@ -29,6 +29,22 @@ message SyncResponse {
     map<string, bytes> Values = 3; // status=false时才有值
 }
 
+// 客户端发送实时消息
+message DMessageRequest {
+    repeated uint32 UserIDs = 1;
+    map<string, bytes> Values = 2;
+}
+
+// 服务器响应用户实时消息结果
+message DMessageResponse {
+    Result Result = 1;
+}
+
+// 服务器转发实时消息
+message DMessagePush {
+    map<string, bytes> Values = 1;
+}
+
 // 同步消息推送
 message SyncPush {
     uint64 Step = 1;