HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulehttp2-tls-0.4.5Haskell2010

Network.HTTP2.TLS.Server

  • 7 types
  • 31 values
  • Packagehttp2-tls-0.4.5
  • Exports38
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceServer.hs

Runners

9 declarations
typetype Server = Request -> Aux -> (Response -> [PushPromise] -> IO ()) -> IO ()
#

Server type. Server takes a HTTP request, should generate a HTTP response and push promises, then should give them to the sending function. The sending function would throw exceptions so that they can be logged.

The sending function must only be called once.

typetype HostName = String
#

Either a host name e.g., "haskell.org" or a numeric host address string consisting of a dotted decimal IPv4 address or an IPv6 address e.g., "192.168.0.1".

newtypenewtype PortNumber
#

Port number. Use the Num instance (i.e. use a literal) to create a PortNumber value.

Example6 expressions
1 :: PortNumber1read "1" :: PortNumber1show (12345 :: PortNumber)"12345"50000 < (51000 :: PortNumber)True50000 < (52000 :: PortNumber)True50000 + (10000 :: PortNumber)60000
Instances10Bounded, Enum, Eq, Integral, Num, Ord, …

Settings

14 declarations

If the size of receiving data is less than or equal, the timeout is not reset. (All)

Example1 expression
settingsSlowlorisSize defaultSettings50

When the size of a read buffer is lower than this limit, the buffer is thrown awany (and is eventually freed). Then a new buffer is allocated. (All)

Example1 expression
settingsReadBufferSize defaultSettings16384
valuesettingsKeyLogger :: Settings -> String -> IO ()
#

Key logger.

Applications may wish to set this depending on the SSLKEYLOGFILE environment variable. The default is do nothing.

Default: do nothing

The max size of early data (0-RTT) to be accepted. (H2 and TLS) 0 means that early data is not accepted.

Example1 expression
settingsEarlyDataSize defaultSettings0

Rate limits

Maximum number of pings allowed per second (CVE-2019-9512)

Example1 expression
settingsPingRateLimit defaultSettings10

Maximum number of settings frames allowed per second (CVE-2019-9515)

Example1 expression
settingsSettingsRateLimit defaultSettings4

Maximum number of reset frames allowed per second (CVE-2023-44487)

Example1 expression
settingsRstRateLimit4

IO backend

7 declarations
datadata IOBackend
#

Sending and receiving functions. Tiemout is reset when they return. One exception is the slowloris attach prevention. See settingsSlowlorisSize.

Internal

4 declarations
datadata Stream
#
Instances1Show
  • Show StreamDefined in http2-5.3.10 · Network.HTTP2.H2.Types