flatbuffer base

This commit is contained in:
2026-03-30 16:18:21 +03:00
parent 9a4b78f272
commit d83cb7fe7b
41 changed files with 1553 additions and 491 deletions

42
flatbuffers/proto.fbs Normal file
View File

@@ -0,0 +1,42 @@
include "auth/auth.fbs";
include "control/control.fbs";
include "stream/stream.fbs";
include "mem/mem.fbs";
namespace hmmmm;
// ── Client → Server ──────────────────────────────────────────────────────────
union ClientPayload {
hmmmm.auth.AuthRequest,
hmmmm.ctrl.CtrlClientMessage,
hmmmm.stream.StreamClientMessage,
hmmmm.mem.MemClientMessage,
}
// Every frame sent by the client is a ClientMessage.
// nonce: client-chosen identifier echoed in the server response.
// Use 0xFFFFFFFFFFFFFFFF for fire-and-forget messages (no reply expected).
table ClientMessage {
nonce: uint64;
payload: ClientPayload;
}
// ── Server → Client ──────────────────────────────────────────────────────────
union ServerPayload {
hmmmm.auth.AuthResponse,
hmmmm.ctrl.CtrlServerMessage,
hmmmm.stream.StreamServerMessage,
hmmmm.mem.MemServerMessage,
}
// Every frame sent by the server is a ServerMessage.
// nonce: echoes the triggering ClientMessage nonce.
// 0xFFFFFFFFFFFFFFFF for unsolicited notifications (state changes, stream pushes).
table ServerMessage {
nonce: uint64;
payload: ServerPayload;
}
root_type ClientMessage;