Skip to main content

Module wire

Module wire 

Source
Expand description

Wire protocol types for sync stream communication.

This module contains the message types used for all sync protocol communication over network streams:

  • StreamMessage: Top-level message wrapper (Init or Message)
  • InitPayload: Initial request types (blob share, key share, delta, snapshot, etc.)
  • MessagePayload: Response and follow-up message types

§Protocol Flow

Initiator                              Responder
│                                            │
│ ── StreamMessage::Init { payload } ──────► │
│                                            │
│ ◄── StreamMessage::Message { payload } ── │
│                                            │
│ ... (continue as needed) ...               │
└────────────────────────────────────────────┘

§Adding New Protocols

To add a new sync protocol’s wire messages:

  1. Add request variant to InitPayload
  2. Add response variant(s) to MessagePayload
  3. Update re-exports in sync.rs

Enums§

InitPayload
Initial request payloads for various sync protocols.
MessagePayload
Response and follow-up message payloads.
StreamMessage
Top-level message for sync stream communication.

Constants§

MAX_TREE_REQUEST_DEPTH
Maximum depth allowed in TreeNodeRequest.