ferrotunnel-protocol
Wire protocol definitions and codec for FerroTunnel.
Overview
This crate defines the binary protocol used for tunnel communication:
- 12 frame types for control, data, and keepalive
- Length-prefixed codec (4-byte length + 1-byte type) with bincode control frames
- 16MB max frame size with validation
Frame Types
Control Frames
Handshake/HandshakeAck- Connection establishmentRegister/RegisterAck- Tunnel registration
Stream Frames
OpenStream/StreamAck- Stream creationData- Payload transferCloseStream- Stream termination
Keepalive
Heartbeat/HeartbeatAck- Connection health
Other
Error- Error reportingPluginData- Plugin communication
Usage
use ;
use ;
// Create a codec for framing
let codec = new;
// Create frames
let frame = Heartbeat ;
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.