DtlsPeerState.setEpoch
void setEpoch(ushort newEpoch) @safe pure nothrow @nogcSets the current epoch, resetting per-epoch state on change.
Each epoch restarts record sequence numbers at zero, so the anti-replay window must be re-armed whenever the epoch changes (RFC 6347 §4.1; RFC 9147 §4.5.1). Assigning the epoch directly would leave a stale window that drops legitimate low sequence numbers of the new epoch as "replays".
Parameters
newEpoch | The epoch negotiated by the handshake sub-engine. |