Module

Node.Http2.Stream

Package
purescript-node-http2
Repository
purescript-node/purescript-node-http2

#toDuplex Source

toDuplex :: forall endpoint. Http2Stream endpoint -> Duplex

#abortedH Source

abortedH :: forall endpoint. EventHandle0 (Http2Stream endpoint)

#closeH Source

closeH :: forall endpoint. EventHandle0 (Http2Stream endpoint)

#errorH Source

errorH :: forall endpoint. EventHandle1 (Http2Stream endpoint) Error

#frameErrorH Source

#readyH Source

readyH :: forall endpoint. EventHandle0 (Http2Stream endpoint)

#timeoutH Source

timeoutH :: forall endpoint. EventHandle0 (Http2Stream endpoint)

#trailersH Source

trailersH :: forall endpoint. EventHandle2 (Http2Stream endpoint) Settings BitwiseFlag

#wantTrailersH Source

wantTrailersH :: forall endpoint. EventHandle0 (Http2Stream endpoint)

#bufferSize Source

bufferSize :: forall endpoint. Http2Stream endpoint -> Effect Int

#close Source

close :: forall endpoint. Http2Stream endpoint -> ErrorCode -> Effect Unit

#closed Source

closed :: forall endpoint. Http2Stream endpoint -> Effect Boolean

#destroyed Source

destroyed :: forall endpoint. Http2Stream endpoint -> Effect Boolean

#endAfterHeaders Source

endAfterHeaders :: forall endpoint. Http2Stream endpoint -> Effect Boolean

#id Source

id :: forall endpoint. Http2Stream endpoint -> Effect (Maybe StreamId)

#pending Source

pending :: forall endpoint. Http2Stream endpoint -> Effect Boolean

#PriorityOptions Source

type PriorityOptions = { exclusive :: Boolean, parent :: Int, silent :: Boolean, weight :: Int }

exclusive <boolean> When true and parent identifies a parent Stream, this stream is made the sole direct dependency of the parent, with all other existing dependents made a dependent of this stream. Default: false. parent <number> Specifies the numeric identifier of a stream this stream is dependent on. weight <number> Specifies the relative dependency of a stream in relation to other streams with the same parent. The value is a number between 1 and 256 (inclusive). silent <boolean> When true, changes the priority locally without sending a PRIORITY frame to the connected peer.

#priority Source

priority :: forall endpoint. Http2Stream endpoint -> PriorityOptions -> Effect Unit

Note: clamping the weight value is done automatically.

#rstCode Source

rstCode :: forall endpoint. Http2Stream endpoint -> Effect (Maybe ErrorCode)

#sentHeaders Source

sentHeaders :: forall endpoint. Http2Stream endpoint -> Effect Headers

#sentInfoHeaders Source

sentInfoHeaders :: forall endpoint. Http2Stream endpoint -> Effect (Array Headers)

#sentTrailers Source

sentTrailers :: forall endpoint. Http2Stream endpoint -> Effect Headers

#session Source

session :: forall endpoint. Http2Stream endpoint -> Effect (Maybe (Http2Session endpoint))

#setTimeout Source

setTimeout :: forall endpoint. Http2Stream endpoint -> Milliseconds -> Effect Unit -> Effect Unit

#Http2StreamState Source

type Http2StreamState = { localClose :: Int, localWindowSize :: Int, remoteClose :: Int, state :: BitwiseFlag, sumDependencyWeight :: Int, weight :: Int }

localWindowSize <number> The number of bytes the connected peer may send for this Http2Stream peer without receiving a WINDOW_UPDATE. state <number> A flag indicating the low-level current state of the Http2Stream peer as determined by nghttp2. localClose <number> 1 if this Http2Stream peer has been closed locally. remoteClose <number> 1 if this Http2Stream peer has been closed remotely. sumDependencyWeight <number> The sum weight of all Http2Stream peer instances that depend on this Http2Stream peer as specified using PRIORITY frames. weight <number> The priority weight of this Http2Stream peer.

#state Source

state :: forall endpoint. Http2Stream endpoint -> Effect Http2StreamState

#sendTrailers Source

sendTrailers :: forall endpoint. Http2Stream endpoint -> Headers -> Effect Unit

#PushStreamOptions Source

type PushStreamOptions = { exclusive :: Boolean, parent :: Int }

exclusive <boolean> When true and parent identifies a parent Stream, the created stream is made the sole direct dependency of the parent, with all other existing dependents made a dependent of the newly created stream. Default: false. parent <number> Specifies the numeric identifier of a stream the newly created stream is dependent on.

#RespondOptions Source

type RespondOptions = { endStream :: Boolean, waitForTrailers :: Boolean }

endStream <boolean> Set to true to indicate that the response will not include payload data. waitForTailers <boolean> When true, the Http2Stream will emit the 'wantTrailers' event after the final DATA frame has been sent.

#RespondWithFdOptions Source

type RespondWithFdOptions = { length :: Int, offset :: Int, waitForTrailers :: Boolean }

waitForTrailers <boolean> When true, the Http2Stream will emit the 'wantTrailers' event after the final DATA frame has been sent. offset <number> The offset position at which to begin reading. length <number> The amount of data from the fd to send.

Note: statCheck function intentionally not supported.

#RespondWithFileOptions Source

type RespondWithFileOptions = { length :: Int, offset :: Int, waitForTrailers :: Boolean }

waitForTrailers <boolean> When true, the Http2Stream will emit the 'wantTrailers' event after the final DATA frame has been sent. offset <number> The offset position at which to begin reading. length <number> The amount of data from the fd to send.

Note: statCheck and onError intentionally not supported.