Expand description
Binary protocol for Unix Domain Socket transport.
This module provides a binary framing format for efficient communication over UDS, eliminating JSON overhead and base64 encoding for body data.
§Wire Format
+----------------+---------------+-------------------+
| Length (4 BE) | Type (1 byte) | Payload (N bytes) |
+----------------+---------------+-------------------+- Length: 4-byte big-endian u32, total length of type + payload
- Type: 1-byte message type discriminator
- Payload: Variable-length payload (format depends on type)
§Performance Benefits
- No JSON parsing overhead (~10x faster for small messages)
- No base64 encoding for body data (saves 33% bandwidth)
- Zero-copy with
bytes::Byteswhere possible
Structs§
- Binary
Agent Response - Binary agent response.
- Binary
Body Chunk - Binary body chunk event (zero-copy).
- Binary
Frame - Binary frame with header and payload.
- Binary
Request Headers - Binary request headers event.
Enums§
- Message
Type - Binary message types
Constants§
- MAX_
BINARY_ MESSAGE_ SIZE - Maximum binary message size (10 MB)