Network.HTTP2.Client.Internal

http2-5.3.9: HTTP/2 library

Safe Haskell | None
Language | Haskell2010

Network.HTTP2.Client.Internal

Contents

- Low level

Synopsis

- newtype Request = Request OutObj
- newtype Response = Response InpObj
- data ClientConfig = ClientConfig {
  - scheme :: Scheme
  - authority :: Authority
  - cacheLimit :: Int
  - connectionWindowSize :: WindowSize
  - settings :: Settings
  }
- data Settings = Settings {
  - headerTableSize :: Int
  - enablePush :: Bool
  - maxConcurrentStreams :: Maybe Int
  - initialWindowSize :: WindowSize
  - maxFrameSize :: Int
  - maxHeaderListSize :: Maybe Int
  - pingRateLimit :: Int
  - emptyFrameRateLimit :: Int
  - settingsRateLimit :: Int
  - rstRateLimit :: Int
  }
- data Aux = Aux {
  - auxPossibleClientStreams :: IO Int
  }
- data Stream
- data ClientIO = ClientIO {
  - cioMySockAddr :: SockAddr
  - cioPeerSockAddr :: SockAddr
  - cioWriteRequest :: Request -> IO (StreamId, Stream)
  - cioReadResponse :: Stream -> IO Response
  - cioWriteBytes :: ByteString -> IO ()
  - cioCreateStream :: IO (StreamId, Stream)
  }
- runIO :: ClientConfig -> Config -> (ClientIO -> IO (IO a)) -> IO a

# Documentation

newtype Request #

Request from client.

Constructors

Request OutObj |

#### Instances

Instances details

Show Request |
Instance details Defined in Network.HTTP.Semantics.Client.Internal Methods showsPrec :: Int -> Request -> ShowS # show :: Request -> String # showList :: [Request] -> ShowS #

newtype Response #

Response from server.

Constructors

Response InpObj |

#### Instances

Instances details

Show Response |
Instance details Defined in Network.HTTP.Semantics.Client.Internal Methods showsPrec :: Int -> Response -> ShowS # show :: Response -> String # showList :: [Response] -> ShowS #

data ClientConfig #

Client configuration

Constructors

ClientConfig |
Fields scheme :: Scheme https or http authority :: Authority Server name cacheLimit :: Int The maximum number of incoming streams on the net connectionWindowSize :: WindowSize The window size of connection. settings :: Settings Settings

#### Instances

Instances details

Show ClientConfig # |
Instance details Defined in Network.HTTP2.Client.Run Methods showsPrec :: Int -> ClientConfig -> ShowS # show :: ClientConfig -> String # showList :: [ClientConfig] -> ShowS #
Eq ClientConfig # |
Instance details Defined in Network.HTTP2.Client.Run Methods (==) :: ClientConfig -> ClientConfig -> Bool # (/=) :: ClientConfig -> ClientConfig -> Bool #

data Settings #

HTTP/2 settings. See https://datatracker.ietf.org/doc/html/rfc9113#name-defined-settings.

Constructors

Settings |
Fields headerTableSize :: Int SETTINGS_HEADER_TABLE_SIZE enablePush :: Bool SETTINGS_ENABLE_PUSH maxConcurrentStreams :: Maybe Int SETTINGS_MAX_CONCURRENT_STREAMS initialWindowSize :: WindowSize SETTINGS_INITIAL_WINDOW_SIZE maxFrameSize :: Int SETTINGS_MAX_FRAME_SIZE maxHeaderListSize :: Maybe Int SETTINGS_MAX_HEADER_LIST_SIZE pingRateLimit :: Int Maximum number of pings allowed per second (CVE-2019-9512) emptyFrameRateLimit :: Int Maximum number of empty data frames allowed per second (CVE-2019-9518) settingsRateLimit :: Int Maximum number of settings frames allowed per second (CVE-2019-9515) rstRateLimit :: Int Maximum number of reset frames allowed per second (CVE-2023-44487)

#### Instances

Instances details

Show Settings # |
Instance details Defined in Network.HTTP2.H2.Settings Methods showsPrec :: Int -> Settings -> ShowS # show :: Settings -> String # showList :: [Settings] -> ShowS #
Eq Settings # |
Instance details Defined in Network.HTTP2.H2.Settings Methods (==) :: Settings -> Settings -> Bool # (/=) :: Settings -> Settings -> Bool #

data Aux #

Additional information.

Constructors

Aux |
Fields auxPossibleClientStreams :: IO Int How many streams can be created without blocking.

# Low level

data Stream #

#### Instances

Instances details

Show Stream # |
Instance details Defined in Network.HTTP2.H2.Types Methods showsPrec :: Int -> Stream -> ShowS # show :: Stream -> String # showList :: [Stream] -> ShowS #

data ClientIO #

Constructors

ClientIO |
Fields cioMySockAddr :: SockAddr cioPeerSockAddr :: SockAddr cioWriteRequest :: Request -> IO (StreamId, Stream) cioReadResponse :: Stream -> IO Response cioWriteBytes :: ByteString -> IO () cioCreateStream :: IO (StreamId, Stream)

runIO :: ClientConfig -> Config -> (ClientIO -> IO (IO a)) -> IO a #

Launching a receiver and a sender.