Class: InboundStream
Defined in: packages/plugin-sdk/src/kernel/session.ts:96
A readable byte stream received from the peer.
Constructors
Constructor
new InboundStream(
session,state,streamId):InboundStream
Defined in: packages/plugin-sdk/src/kernel/session.ts:97
Parameters
session
state
StreamInbound
streamId
string
Returns
InboundStream
Properties
streamId
readonlystreamId:string
Defined in: packages/plugin-sdk/src/kernel/session.ts:100
Methods
collect()
collect():
Promise<Uint8Array<ArrayBufferLike>>
Defined in: packages/plugin-sdk/src/kernel/session.ts:131
Drain everything into a single Uint8Array (bounded by maxTotalBytes).
Returns
Promise<Uint8Array<ArrayBufferLike>>
pull()
pull():
Promise<Uint8Array<ArrayBufferLike> |null>
Defined in: packages/plugin-sdk/src/kernel/session.ts:107
Pull the next chunk; null means the stream ended cleanly. Backpressure:
the session replenishes credit only after the consumer pulls.
Returns
Promise<Uint8Array<ArrayBufferLike> | null>