2025-06-01 14:26:57 -05:00
|
|
|
|
syntax = "proto3";
|
2025-06-23 07:18:26 -05:00
|
|
|
|
package lesavka;
|
2025-06-01 14:26:57 -05:00
|
|
|
|
|
2025-06-21 05:21:57 -05:00
|
|
|
|
// smaller, fixed-size payloads -> less allocation and simpler decoding
|
2025-06-17 08:17:23 -05:00
|
|
|
|
message KeyboardReport { bytes data = 1; } // exactly 8 bytes
|
|
|
|
|
|
message MouseReport { bytes data = 1; } // exactly 4 bytes
|
2025-06-01 14:26:57 -05:00
|
|
|
|
|
2025-06-21 05:21:57 -05:00
|
|
|
|
// ------------ video ------------
|
|
|
|
|
|
message MonitorRequest {
|
|
|
|
|
|
uint32 id = 1; // 0/1 for now
|
|
|
|
|
|
uint32 max_bitrate = 2; // kb/s – client hints, server may ignore
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message VideoPacket {
|
|
|
|
|
|
uint32 id = 1; // monitor id
|
|
|
|
|
|
uint64 pts = 2; // monotonically increasing micro‑seconds
|
|
|
|
|
|
bytes data = 3; // full H.264 access‑unit (length‑prefixed)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-06-01 14:26:57 -05:00
|
|
|
|
service Relay {
|
2025-06-17 08:17:23 -05:00
|
|
|
|
rpc StreamKeyboard (stream KeyboardReport) returns (stream KeyboardReport);
|
|
|
|
|
|
rpc StreamMouse (stream MouseReport) returns (stream MouseReport);
|
2025-06-21 05:21:57 -05:00
|
|
|
|
|
|
|
|
|
|
// client requests one monitor, server pushes raw H.264
|
|
|
|
|
|
rpc CaptureVideo (MonitorRequest) returns (stream VideoPacket);
|
|
|
|
|
|
}
|