lastIssuedId property

int get lastIssuedId

The id handed out most recently, for a transport that has to CONTINUE this sequence on a fresh connection rather than restart it.

Most recent, not highest: after the space wraps the highest is the maximum, and a manager seeded from it restarts at the first id -- the ones the old connection is reusing.

A reconnecting transport builds a new manager, and a new manager starts over at 1 — so the call that opens after a reconnect gets the id a dead call held before it. The dead call's teardown then acts on the live one: measured over websocket, a late finishSending for the old id HALF-CLOSED the new call's request stream and the server finished serving it. Seeding a new manager from this value makes the two id spaces disjoint, which is the only thing that can distinguish them — the id is all a teardown has to present.

Reads as the manager's own "last generated" cursor, so RpcStreamIdManager(isClient: ..., resumeAfter: old.lastIssuedId) round-trips exactly.

Implementation

int get lastIssuedId => _lastIssued;