Skip to content

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.

In

new ScanningRegistry<In>(options?): ScanningRegistry<In>

Defined in: packages/net-core/src/scanning-registry.ts:35

ScanningRegistryOptions

ScanningRegistry<In>

get size(): number

Defined in: packages/net-core/src/scanning-registry.ts:39

Number of exchanges currently outstanding, including tombstones.

number

Number of exchanges currently outstanding, including tombstones.

ExchangeRegistry.size

offer(frame, body?): boolean

Defined in: packages/net-core/src/scanning-registry.ts:48

Offer an inbound frame to the outstanding exchanges.

In

The decoded frame.

ReadableStream<Uint8Array<ArrayBufferLike>>

Streamed payload declared by the codec, if any.

boolean

true if an exchange claimed the frame, false if it should be treated as unsolicited.

ExchangeRegistry.offer


register(exchange): void

Defined in: packages/net-core/src/scanning-registry.ts:44

Correlation is positional here, so any supplied key is ignored.

PendingExchange<In>

void

ExchangeRegistry.register


rejectAll(error): void

Defined in: packages/net-core/src/scanning-registry.ts:80

Fail every outstanding exchange, for example when the connection drops.

Error

The reason to reject with.

void

ExchangeRegistry.rejectAll


remove(exchange): void

Defined in: packages/net-core/src/scanning-registry.ts:73

Stop tracking an exchange without completing it.

PendingExchange<In>

The exchange to drop.

void

ExchangeRegistry.remove