DtlsPeerState.nextSendSequence

ulong nextSendSequence() @safe pure nothrow @nogc

Consume the next send sequence number.

Returns the current sequence number and increments it for the next record. Sequence numbers are 48-bit values. At the 48-bit limit the counter saturates instead of wrapping: reusing a sequence number would reuse an AEAD nonce (RFC 6347 §4.1 requires a rehandshake before that point; callers can detect exhaustion via sendSequence == DTLS_MAX_SEQUENCE).

Returns

The sequence number to use for the next outgoing record.