http3-0.1.1: HTTP/3 library
Safe HaskellNone
LanguageHaskell2010

Network.QPACK

Description

Thread-safe QPACK encoder/decoder.

Synopsis

Encoder

data QEncoderConfig Source #

Configuration for QPACK encoder.

Instances

Instances details
Show QEncoderConfig Source # 
Instance details

Defined in Network.QPACK

defaultQEncoderConfig :: QEncoderConfig Source #

Default configuration for QPACK encoder.

>>> defaultQEncoderConfig
QEncoderConfig {ecMaxTableCapacity = 4096, ecHeaderBlockBufferSize = 4096, ecInstructionBufferSize = 4096}

data TableOperation Source #

Constructors

TableOperation 

Fields

Encoder for debugging

type QEncoderS = StreamId -> [Header] -> IO EncodedFieldSection Source #

QPACK simple encoder.

Decoder

data QDecoderConfig Source #

Configuration for QPACK decoder.

Instances

Instances details
Show QDecoderConfig Source # 
Instance details

Defined in Network.QPACK

defaultQDecoderConfig :: QDecoderConfig Source #

Default configuration for QPACK decoder.

>>> defaultQDecoderConfig
QDecoderConfig {dcMaxTableCapacity = 4096, dcHuffmanBufferSize = 2048, dcBlockedSterams = 100, dcMaxFieldSectionSize = 32768}

Decoder for debugging

type QDecoderS = StreamId -> EncodedFieldSection -> IO (Maybe [Header]) Source #

QPACK simple decoder.

newQDecoderS :: QDecoderConfig -> (EncodedDecoderInstruction -> IO ()) -> Bool -> IO (QDecoderS, EncoderInstructionHandlerS) Source #

Creating a new simple QPACK decoder.

Types

type EncodedEncoderInstruction = ByteString Source #

Encoded encoder instruction.

type EncoderInstructionHandler = (Int -> IO EncodedEncoderInstruction) -> IO () Source #

Encoder instruction handler.

type EncoderInstructionHandlerS = EncodedEncoderInstruction -> IO EncodedEncoderInstruction Source #

Simple encoder instruction handler. Leftover is returned.

type EncodedDecoderInstruction = ByteString Source #

Encoded decoder instruction.

type DecoderInstructionHandler = (Int -> IO EncodedDecoderInstruction) -> IO () Source #

Decoder instruction handler.

type InstructionHandler = (Int -> IO ByteString) -> IO () Source #

A type to integrating handlers.

type Size = Int #

Size in bytes.

Re-exports

type TokenHeaderTable = (TokenHeaderList, ValueTable) #

A pair of token list and value table.

type TokenHeaderList = [TokenHeader] #

TokenBased header list.

type ValueTable = Array Int (Maybe FieldValue) #

An array to get FieldValue quickly. getHeaderValue should be used. Internally, the key is tokenIx.

type Header = (HeaderName, ByteString) #

A full HTTP header field with the name and value separated.

E.g. "Content-Length: 28" parsed into a Header would turn into ("Content-Length", "28")

toTokenHeaderTable :: [Header] -> IO TokenHeaderTable #

Converting a header list of the http-types style to TokenHeaderList and ValueTable.

original :: CI s -> s #

Retrieve the original string-like value.

foldedCase :: CI s -> s #

Retrieve the case folded string-like value. (Also see foldCase).

mk :: FoldCase s => s -> CI s #

Make the given string-like value case insensitive.