Files
86Box/src/network/networkmessage.proto.txt
Jasmine Iwanek 2dc28d39b1 Network Switch support
Co-Authored-By: Alexander Babikov <2708460+lemondrops@users.noreply.github.com>
Co-Authored-By: cold-brewed <47337035+cold-brewed@users.noreply.github.com>
2025-08-02 16:18:09 -04:00

38 lines
817 B
Plaintext

syntax = "proto3";
import "nanopb.proto";
enum MessageType {
MESSAGE_TYPE_UNSPECIFIED = 0;
MESSAGE_TYPE_DATA = 1;
MESSAGE_TYPE_JOIN = 2;
MESSAGE_TYPE_LEAVE = 3;
MESSAGE_TYPE_KEEPALIVE = 4;
MESSAGE_TYPE_FRAGMENT = 5;
MESSAGE_TYPE_ACK = 6;
MESSAGE_TYPE_CONNECT_REQUEST = 7;
MESSAGE_TYPE_CONNECT_REPLY = 8;
}
message Fragment {
uint32 id = 1;
uint32 sequence = 2;
uint32 total = 3;
}
message Ack {
uint32 id = 1;
uint32 history = 2;
}
message NetworkMessage {
MessageType message_type = 1;
uint32 client_id = 2;
bytes mac = 3 [(nanopb).type = FT_POINTER];
bytes frame = 4 [(nanopb).type = FT_POINTER];
uint32 flags = 5;
uint32 version = 6;
Ack ack = 7;
Fragment fragment = 8;
int64 timestamp = 9;
uint32 sequence = 10;
}