Expand description
Connected TCP transport and the shared length-prefix framing layer.
TcpTransport wraps a std::net::TcpStream and implements
confium_net::Transport. Each send is written to the socket as
a 4-byte big-endian length prefix followed by the payload bytes;
each recv reads exactly one framed message (repeating partial-read
calls until the full payload is in hand) so the
“one send == one recv” contract holds over the byte stream.
The framing helpers ([write_frame], [read_frame]) live here and
are reused by crate::listener::TcpListener for accepted streams.
Structs§
- TcpTransport
- Connected TCP transport. Owns the underlying
TcpStream;closeshuts both directions of the stream down so the peer observes a clean end-of-stream. - TcpTransport
Kind - Registry kind for
tcp,tcp4,tcp6.