Skip to main content

Module pts

Module pts 

Source
Expand description

Update gap detection and recovery.

Tracks pts / qts / seq / date plus per-channel pts, and fills gaps via updates.getDifference (global) and updates.getChannelDifference (per-channel).

§What “gap” means

Telegram guarantees updates arrive in order within a pts counter. If new_pts != local_pts + pts_count there is a gap and we must ask the server for the missed updates before processing this one.

Structs§

PossibleGapBuffer
Buffers updates received during a possible-gap window so we don’t fire getDifference on every slightly out-of-order update.
PtsState
Full MTProto sequence-number state, including per-channel counters.

Enums§

PtsCheckResult