Expand description
TCP transport implementation with length-prefixed framing.
Uses a simple 4-byte big-endian length header followed by the payload. Maximum payload size is 64 MB to prevent accidental memory exhaustion.
Structs§
- TcpConnection
- A persistent TCP connection with length-prefixed framing.
- TcpTransport
- TCP-based transport using length-prefixed framing.
Constants§
- MAX_
PAYLOAD_ SIZE - Maximum payload size: 64 MB.
Functions§
- read_
length_ prefixed - Read a length-prefixed frame: read raw bytes, then decompress.
- write_
length_ prefixed - Write a length-prefixed frame: compress, then write 4-byte BE length + framed payload.