Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
A stream-level error that results in sending RST_STREAM for that stream only.
$$\text{StreamError} = \text{StreamId} \times \text{ErrorCode} \times \text{String}$$
- streamId : StreamId
The stream that experienced the error.
- errorCode : ErrorCode
The error code to send in the RST_STREAM frame.
- message : String
Human-readable description for debugging.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
State for tracking header block assembly across HEADERS + CONTINUATION frames.
RFC 9113 Section 4.3: A header block that does not fit within a single HEADERS or PUSH_PROMISE frame is continued in one or more CONTINUATION frames. The header block ends when END_HEADERS is set.
$$\text{HeaderBlockState} = \text{Idle} \mid \text{Assembling}(\text{StreamId}, \text{ByteArray})$$
- idle : HeaderBlockState
No header block is being assembled.
- assembling
(streamId : StreamId)
(fragments : ByteArray)
: HeaderBlockState
A header block is being assembled for the given stream. The ByteArray accumulates the header block fragment bytes.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Check if we are currently assembling a header block.
Equations
Instances For
Get the stream ID being assembled, if any.
Equations
- Network.HTTP2.HeaderBlockState.idle.streamId? = none
- (Network.HTTP2.HeaderBlockState.assembling streamId fragments).streamId? = some streamId
Instances For
Append a fragment to the header block being assembled.
Returns none if not currently assembling.
Equations
- Network.HTTP2.HeaderBlockState.idle.appendFragment fragment = none
- (Network.HTTP2.HeaderBlockState.assembling streamId fragments).appendFragment fragment = some (Network.HTTP2.HeaderBlockState.assembling streamId (fragments ++ fragment))
Instances For
Get the complete assembled header block and reset to idle.
Returns none if not currently assembling.
Equations
Instances For
HTTP/2 connection-level protocol result.
- ok
{α : Type}
(value : α)
: HTTP2Result α
Success with a value.
- connectionError
{α : Type}
(error : ConnectionError)
: HTTP2Result α
Connection error requiring GOAWAY.
- streamError
{α : Type}
(error : StreamError)
: HTTP2Result α
Stream error requiring RST_STREAM.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Map a function over the success value.
Equations
- Network.HTTP2.HTTP2Result.map f (Network.HTTP2.HTTP2Result.ok a) = Network.HTTP2.HTTP2Result.ok (f a)
- Network.HTTP2.HTTP2Result.map f (Network.HTTP2.HTTP2Result.connectionError a) = Network.HTTP2.HTTP2Result.connectionError a
- Network.HTTP2.HTTP2Result.map f (Network.HTTP2.HTTP2Result.streamError a) = Network.HTTP2.HTTP2Result.streamError a
Instances For
Bind operation for chaining HTTP2Results.