http3-0.0.15: HTTP/3 library
Safe HaskellSafe-Inferred
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 {ecDynamicTableSize = 4096, ecHeaderBlockBufferSize = 4096, ecPrefixBufferSize = 128, ecInstructionBufferSize = 4096, encStrategy = EncodeStrategy {compressionAlgo = Static, useHuffman = True}}

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 {dcDynamicTableSize = 4096, dcHuffmanBufferSize = 4096}

Decoder for debugging

type QDecoderS = EncodedFieldSection -> IO [Header] Source #

QPACK simple decoder.

newQDecoderS :: QDecoderConfig -> 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 () Source #

Simple encoder instruction handler.

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.

Strategy

data EncodeStrategy #

Strategy for HPACK encoding.

Constructors

EncodeStrategy 

Fields

Instances

Instances details
Show EncodeStrategy 
Instance details

Defined in Network.HPACK.Types

Eq EncodeStrategy 
Instance details

Defined in Network.HPACK.Types

data CompressionAlgo #

Compression algorithms for HPACK encoding.

Constructors

Naive

No compression

Static

Using indices in the static table only

Linear

Using indices

Instances

Instances details
Show CompressionAlgo 
Instance details

Defined in Network.HPACK.Types

Eq CompressionAlgo 
Instance details

Defined in Network.HPACK.Types

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.