Skip to main content

Module mesh_tcp

Module mesh_tcp 

Source
Expand description

TCP transport backend for mesh networking (K6).

Uses tokio TCP for node-to-node communication. Production Cloud/Edge deployments prefer QUIC (mesh_quic / ADR-026) with optional Noise (mesh_noise / snow). Plain TCP remains the default and is useful when UDP is blocked.

§Cancel-safety (ADR-010 / WEFT-18)

TcpMeshStream::recv keeps partial length/body progress on self so it is safe to race inside tokio::select! (mesh peer loop in boot.rs). A naive read_exact(len) then read_exact(body) pair is not cancel-safe: dropping mid-body desyncs the next length prefix.

Structs§

TcpMeshStream
A MeshStream backed by a single TCP connection.
TcpTransport
TCP mesh transport.
TcpTransportListener
A TransportListener backed by a tokio TcpListener.