dht-data/messages.proto

22 lines
423 B
Protocol Buffer

syntax = "proto2";
enum Type {
BOOTSTRAP_REQUEST = 1;
BOOTSTRAP_RESPONSE = 2;
CONNECTED = 3;
DISCONNECTED = 4;
STATE = 5;
}
message Message {
required Type type = 1;
map<string, State> bootstrap = 2; // For bootstrap events
optional bytes data = 3; // For state event
optional bytes id = 4; // For connected and disconnected events
}
message State {
repeated bytes connectedTo = 1;
optional bytes data = 2;
}