{-# LANGUAGE OverloadedStrings #-}
module Network.HTTP2.Frame (
Frame(..)
, FrameHeader(..)
, FramePayload(..)
, HeaderBlockFragment
, Padding
, isPaddingDefined
, encodeFrame
, encodeFrameChunks
, encodeFrameHeader
, encodeFrameHeaderBuf
, encodeFramePayload
, EncodeInfo(..)
, encodeInfo
, module Network.HTTP2.Frame.Decode
, FrameTypeId(..)
, framePayloadToFrameTypeId
, FrameType
, fromFrameTypeId
, toFrameTypeId
, Priority(..)
, Weight
, defaultPriority
, highestPriority
, defaultWeight
, StreamId
, isControl
, isClientInitiated
, isServerInitiated
, 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.Frame.Decode
import Network.HTTP2.Frame.Encode
import Network.HTTP2.Frame.Types
connectionPreface :: ByteString
connectionPreface :: ByteString
connectionPreface = ByteString
"PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"
connectionPrefaceLength :: Int
connectionPrefaceLength :: Int
connectionPrefaceLength = ByteString -> Int
BS.length ByteString
connectionPreface