Skip to content

Class: RequestIds ​

The request ids a connection hands out: 1, 2, 3 … wrapping at 2³².

Per connection, and reset by a new one, because the server's 64-entry response cache is keyed per session and a resumed session keeps its cache — so a client that restarted its counter after a resume could collide with an id the server has already answered and be served the old answer. Starting at 1 on a genuinely new session is safe; a resume keeps counting.

Constructors ​

Constructor ​

ts
new RequestIds(next?): RequestIds;

Parameters ​

ParameterTypeDefault value
nextnumber1

Returns ​

RequestIds

Accessors ​

current ​

Get Signature ​

ts
get current(): number;
Returns ​

number

Methods ​

take() ​

ts
take(): number;

Returns ​

number

Talkline documentation