Skip to main content

Module dnode_client

Module dnode_client 

Source
Expand description

Inbound peer-connection driver for the dnode peer plane.

The local node is the receiver. The driver:

  1. Reads bytes off the transport into a contiguous buffer.
  2. Drives the dnode header parser (crate::proto::dnode::DnodeParser) over the buffer until a full Dmsg header has been observed.
  3. If the header marks the payload as encrypted, decrypts it using the per-connection AES key bound during the handshake via crate::crypto::Crypto. When the header indicates a plaintext payload (the peer-plane was negotiated unsecured), the bytes pass through unchanged.
  4. Drives the datastore parser over the (decrypted) payload to reconstruct a Msg.
  5. Hands the parsed Msg to the supplied ClientHandler’s dispatcher and routes the dispatcher’s response back through the per-connection responder channel.

Functions§

dnode_client_loop
Drive a DNODE_PEER_CLIENT FSM until the peer closes.

Type Aliases§

DnodeClientHandler
Type alias for the dnode client handler bundle.