{-# LANGUAGE OverloadedStrings #-}
module Network.HTTP2 (
Frame(..)
, FrameHeader(..)
, FramePayload(..)
, HeaderBlockFragment
, Padding
, isPaddingDefined
, encodeFrame
, encodeFrameChunks
, encodeFrameHeader
, encodeFrameHeaderBuf
, encodeFramePayload
, EncodeInfo(..)
, encodeInfo
, module Network.HTTP2.Decode
, FrameTypeId(..)
, framePayloadToFrameTypeId
, FrameType
, fromFrameTypeId
, toFrameTypeId
, Priority(..)
, Weight
, defaultPriority
, highestPriority
, StreamId
, isControl
, isRequest
, isResponse
, testExclusive
, setExclusive
, clearExclusive
, FrameFlags
, defaultFlags
, testEndStream
, testAck
, testEndHeader
, testPadded
, testPriority
, setEndStream
, setAck
, setEndHeader
, setPadded
, setPriority
, SettingsList
, SettingsKeyId(..)
, SettingsValue
, fromSettingsKeyId
, toSettingsKeyId
, checkSettingsList
, Settings(..)
, defaultSettings
, updateSettings
, WindowSize
, defaultInitialWindowSize
, maxWindowSize
, isWindowOverflow
, ErrorCode
, ErrorCodeId(..)
, fromErrorCodeId
, toErrorCodeId
, HTTP2Error(..)
, errorCodeId
, connectionPreface
, connectionPrefaceLength
, frameHeaderLength
, maxPayloadLength
, recommendedConcurrency
) where
import qualified Data.ByteString as BS
import Imports
import Network.HTTP2.Decode
import Network.HTTP2.Encode
import Network.HTTP2.Types
connectionPreface :: ByteString
connectionPreface = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"
connectionPrefaceLength :: Int
connectionPrefaceLength = BS.length connectionPreface