PendingExchange
Defined in: packages/net-core/src/pending-exchange.ts:24
One outstanding request awaiting its response frames.
Created by a session and held by an ExchangeRegistry until it completes, is abandoned, or the connection fails.
Type Parameters
Section titled “Type Parameters”In
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PendingExchange<
In>(accept,resolve,reject,onBody?):PendingExchange<In>
Defined in: packages/net-core/src/pending-exchange.ts:38
Parameters
Section titled “Parameters”accept
Section titled “accept”ExchangeAccept<In>
resolve
Section titled “resolve”(frames) => void
reject
Section titled “reject”(error) => void
onBody?
Section titled “onBody?”(frame, body) => void
Returns
Section titled “Returns”PendingExchange<In>
Properties
Section titled “Properties”accept
Section titled “accept”
readonlyaccept:ExchangeAccept<In>
Defined in: packages/net-core/src/pending-exchange.ts:39
frames
Section titled “frames”
readonlyframes:In[] =[]
Defined in: packages/net-core/src/pending-exchange.ts:26
Frames accepted so far, in arrival order.
onBody?
Section titled “onBody?”
readonlyoptionalonBody?: (frame,body) =>void
Defined in: packages/net-core/src/pending-exchange.ts:42
Parameters
Section titled “Parameters”In
ReadableStream<Uint8Array<ArrayBufferLike>>
Returns
Section titled “Returns”void
orphaned
Section titled “orphaned”orphaned:
boolean=false
Defined in: packages/net-core/src/pending-exchange.ts:34
Set when the caller abandoned the exchange under the discard policy.
The exchange stays registered so it can absorb the response that is still in flight, but its result is thrown away instead of delivered.
Accessors
Section titled “Accessors”isSettled
Section titled “isSettled”Get Signature
Section titled “Get Signature”get isSettled():
boolean
Defined in: packages/net-core/src/pending-exchange.ts:46
Whether this exchange has already resolved or rejected.
Returns
Section titled “Returns”boolean
Methods
Section titled “Methods”complete()
Section titled “complete()”complete():
void
Defined in: packages/net-core/src/pending-exchange.ts:51
Deliver the collected frames, unless the exchange was orphaned.
Returns
Section titled “Returns”void
fail()
Section titled “fail()”fail(
error):void
Defined in: packages/net-core/src/pending-exchange.ts:66
Fail the exchange.
Parameters
Section titled “Parameters”Error
The reason to reject with.
Returns
Section titled “Returns”void