#include <fastmm/core/book/book_syncer.hpp>
◆ BookSyncer()
template<class Traits , class Sink >
◆ state()
template<class Traits , class Sink >
◆ synced()
template<class Traits , class Sink >
◆ last_update_id()
template<class Traits , class Sink >
◆ resync_count()
template<class Traits , class Sink >
◆ buffered()
template<class Traits , class Sink >
◆ start()
template<class Traits , class Sink >
Begin (or restart) synchronisation.
◆ resync()
template<class Traits , class Sink >
Force a resync (e.g. crossed book beyond grace, or a disconnect).
◆ on_delta()
template<class Traits , class Sink >
Delta from the stream.
For venues whose stream carries snapshots (Bybit) a message flagged kSnapshot is routed to on_snapshot().
< not started / waiting for start()
No buffered delta was newer than the snapshot, so the first live one must be checked with the first-delta rule: it may overlap the snapshot (U <= L+1 <= u on Binance spot) rather than follow it exactly, and must not be mistaken for a gap.
stale duplicates are silently dropped
◆ on_snapshot()
template<class Traits , class Sink >
Snapshot (REST response or in-stream snapshot). Replays the buffer.
Find the first non-stale buffered delta; it must bracket L.
Buffered stream starts after the snapshot: the snapshot is too old. Keep buffering and ask again.
keep only the deltas we still need
The stream itself has a gap before d: d and what follows it start the next attempt.
< nothing newer than the snapshot was buffered
◆ kMaxBuffered
template<class Traits , class Sink >
◆ kDefaultBufferBytes
template<class Traits , class Sink >