Skip to main content

Crate simple_comms

Crate simple_comms 

Source
Expand description

simple_comms is Artisan Hosting’s wire protocol for authenticated, encrypted communication between two peers over TCP or a Unix domain socket.

A connection is secured with a Noise_NK handshake (see protocol::handshake), after which every message is framed by protocol::message::ProtocolMessage and encrypted with the resulting transport cipher. See docs/QUICKSTART.md for a fast-path tour with examples, docs/PROTOCOL.md for the byte-level wire format, and docs/HANDSHAKE.md for the connection lifecycle (Hello -> HelloAck -> Open -> OpenAck -> Data, plus Rekey).

  • protocol is the wire format itself: the fixed header, flags and message types, the Noise handshake, and the payload transforms (compression, hex-encoding, checksums, padding) applied before encryption.
  • network is the async glue that drives the protocol over a tokio stream: establishing a connection and sending/receiving messages on it.

Modules§

network
Async helpers that drive the crate::protocol wire format over a tokio stream (TCP or Unix socket): establishing a Noise_NK-secured connection and sending/receiving framed crate::protocol::message::ProtocolMessages on it.
protocol
The simple_comms wire protocol: message framing, the fixed header format, flags/message types, the Noise_NK handshake, and the payload transforms (compression, encoding, checksums, padding, encryption) applied when serializing a message::ProtocolMessage.

Constants§

RELEASEINFO
The release channel this build identifies itself as. Encoded into every outgoing message’s header version (see network::utils::comms_version) so peers can detect protocol drift.