ScanningRegistry
Defined in: packages/net-core/src/scanning-registry.ts:31
Order-based ExchangeRegistry.
Offers each inbound frame to outstanding exchanges from oldest to newest,
stopping at the first that does not return skip, and giving up after
ScanningRegistryOptions.maxDepth candidates.
Strict FIFO is the depth-1 case rather than a separate implementation, which keeps the two behaviours from drifting apart.
Type Parameters
Section titled “Type Parameters”In
Implements
Section titled “Implements”ExchangeRegistry<In,never>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ScanningRegistry<
In>(options?):ScanningRegistry<In>
Defined in: packages/net-core/src/scanning-registry.ts:35
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”ScanningRegistry<In>
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get size():
number
Defined in: packages/net-core/src/scanning-registry.ts:39
Number of exchanges currently outstanding, including tombstones.
Returns
Section titled “Returns”number
Number of exchanges currently outstanding, including tombstones.
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”offer()
Section titled “offer()”offer(
frame,body?):boolean
Defined in: packages/net-core/src/scanning-registry.ts:48
Offer an inbound frame to the outstanding exchanges.
Parameters
Section titled “Parameters”In
The decoded frame.
ReadableStream<Uint8Array<ArrayBufferLike>>
Streamed payload declared by the codec, if any.
Returns
Section titled “Returns”boolean
true if an exchange claimed the frame, false if it should be
treated as unsolicited.
Implementation of
Section titled “Implementation of”register()
Section titled “register()”register(
exchange):void
Defined in: packages/net-core/src/scanning-registry.ts:44
Correlation is positional here, so any supplied key is ignored.
Parameters
Section titled “Parameters”exchange
Section titled “exchange”PendingExchange<In>
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”rejectAll()
Section titled “rejectAll()”rejectAll(
error):void
Defined in: packages/net-core/src/scanning-registry.ts:80
Fail every outstanding exchange, for example when the connection drops.
Parameters
Section titled “Parameters”Error
The reason to reject with.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”remove()
Section titled “remove()”remove(
exchange):void
Defined in: packages/net-core/src/scanning-registry.ts:73
Stop tracking an exchange without completing it.
Parameters
Section titled “Parameters”exchange
Section titled “exchange”PendingExchange<In>
The exchange to drop.
Returns
Section titled “Returns”void