Skip to main content

Module wire

Module wire 

Source
Expand description

Sync wire protocol: frame format and message types.

Frame format: [msg_type: 1B][length: 4B LE][rkyv/msgpack body]

Message types:

  • 0x01 Handshake (client → server)
  • 0x02 HandshakeAck (server → client)
  • 0x10 DeltaPush (client → server)
  • 0x11 DeltaAck (server → client)
  • 0x12 DeltaReject (server → client)
  • 0x14 CollectionPurged (server → client)
  • 0x20 ShapeSubscribe (client → server)
  • 0x21 ShapeSnapshot (server → client)
  • 0x22 ShapeDelta (server → client)
  • 0x23 ShapeUnsubscribe (client → server)
  • 0x30 VectorClockSync (bidirectional)
  • 0x40 TimeseriesPush (client → server)
  • 0x41 TimeseriesAck (server → client)
  • 0x50 ResyncRequest (bidirectional)
  • 0x52 Throttle (client → server)
  • 0x60 TokenRefresh (client → server)
  • 0x61 TokenRefreshAck (server → client)
  • 0x70 DefinitionSync (server → client)
  • 0x80 PresenceUpdate (client → server)
  • 0x81 PresenceBroadcast (server → all subscribers)
  • 0x82 PresenceLeave (server → all subscribers)
  • 0xFF Ping/Pong (bidirectional)

Re-exports§

pub use delta::CollectionPurgedMsg;
pub use delta::DeltaAckMsg;
pub use delta::DeltaPushMsg;
pub use delta::DeltaRejectMsg;
pub use frame::SyncFrame;
pub use frame::SyncMessageType;
pub use presence::PeerPresence;
pub use presence::PresenceBroadcastMsg;
pub use presence::PresenceLeaveMsg;
pub use presence::PresenceUpdateMsg;
pub use resync::ResyncReason;
pub use resync::ResyncRequestMsg;
pub use resync::ThrottleMsg;
pub use session::HandshakeAckMsg;
pub use session::HandshakeMsg;
pub use session::PingPongMsg;
pub use session::TokenRefreshAckMsg;
pub use session::TokenRefreshMsg;
pub use shape::ShapeDeltaMsg;
pub use shape::ShapeSnapshotMsg;
pub use shape::ShapeSubscribeMsg;
pub use shape::ShapeUnsubscribeMsg;
pub use shape::VectorClockSyncMsg;
pub use timeseries::DefinitionSyncMsg;
pub use timeseries::TimeseriesAckMsg;
pub use timeseries::TimeseriesPushMsg;

Modules§

delta
Delta push / ack / reject / collection-purged messages.
frame
Wire frame format and message-type discriminants.
presence
Presence / awareness messages.
resync
Re-sync request and throttle messages.
session
Session lifecycle messages: handshake, token refresh, keepalive.
shape
Shape subscribe/snapshot/delta/unsubscribe + vector clock sync messages.
timeseries
Timeseries ingest + definition-sync messages.