catsync/assets/protobuf/peer_message.proto

21 lines
414 B
Protocol Buffer
Raw Normal View History

2024-12-22 19:34:50 +08:00
syntax="proto3";
package main;
option go_package = "/pb";
import public "google/protobuf/timestamp.proto";
message PeerMessage {
uint32 magic_number= 1;
uint32 version = 2;
PeerMessageType type = 3;
google.protobuf.Timestamp send_timestamp = 4;
string uid = 5;
}
enum PeerMessageType {
PEER_MESSAGE_TYPE_REQUEST = 0;
PEER_MESSAGE_TYPE_RESPONSE = 1;
PEER_MESSAGE_TYPE_ACK = 2;
}