Jelajahi Sumber

1、syncResponse添加服务器收到syncRequest的时间
2、MasterPush添加服务器开始向master推送消息的时间
3、增加MasterNotifyResponse协议,表示服务器收到了masterNotify的消息

王虎 3 tahun lalu
induk
melakukan
b87fab1e76
2 mengubah file dengan 8 tambahan dan 0 penghapusan
  1. 1 0
      README.md
  2. 7 0
      protos/sync.proto

+ 1 - 0
README.md

@@ -68,5 +68,6 @@
 | 160 | DMessageRequest | c -> s | 客户端发送消息给其他人 |
 | 161 | DMessageResponse | s -> c | 服务端响应协议结果 |
 | 162 | DMessagePush | s -> c | 服务端转发消息给其他人 |
+| 163 | MasterNotifyResponse | s -> c | 服务器收到masterNotify的响应 |
 
 

+ 7 - 0
protos/sync.proto

@@ -27,6 +27,7 @@ message SyncResponse {
     bool Status = 1;
     uint64 Step = 2; // status=false时才有值
     map<string, bytes> Values = 3; // status=false时才有值
+    uint64 T = 4; // 服务器收到sync request的时间戳(毫秒)
 }
 
 // 客户端发送实时消息
@@ -55,6 +56,7 @@ message SyncPush {
 message MasterPush {
     uint64 Step = 1;
     map<string, bytes> Values = 2;
+    uint64 T = 3; // 服务器开始推送时间戳
 }
 
 // 主机广播消息给flower
@@ -63,6 +65,11 @@ message MasterNotify {
     map<string, bytes> Values = 2;
 }
 
+// 主机广播消息给flower
+message MasterNotifyResponse {
+    uint64 T = 1; // 服务器收到MasterNotify的时间戳(毫秒)
+}
+
 // 主机存储状态
 message MasterStoreNotify {
     map<string, bytes> Values = 1;