Expand description
Wire protocol: frame format for Mill-RPC.
+--------+--------+-------+--------+-----------+---------+
| Magic | Version| Flags | MsgType| PayloadLen| Payload |
| 2B | 1B | 1B | 1B | 4B (LE) | N bytes |
+--------+--------+-------+--------+-----------+---------+Request payload:
+------------+-----------+-----------+---------+
| RequestID | ServiceID | MethodID | Args |
| 8B (LE) | 2B (LE) | 2B (LE) | N bytes |
+------------+-----------+-----------+---------+Structs§
- Flags
- Bit flags for frame options.
- Frame
- A complete frame (header + payload).
- Frame
Header - Parsed frame header.
Enums§
- Message
Type - Message types in the wire protocol.
Constants§
- HEADER_
SIZE - Header size in bytes (magic:2 + version:1 + flags:1 + msg_type:1 + payload_len:4 = 9).
- MAGIC
- Magic bytes identifying Mill-RPC frames.
- MAX_
PAYLOAD_ SIZE - Maximum payload size (16 MB).
- VERSION
- Current protocol version.
Functions§
- parse_
frames - Reads frames from a byte buffer. Returns parsed frames and the number of bytes consumed.