http2-client-0.9.0.0: A native HTTP2 client library.

Safe HaskellNone
LanguageHaskell2010

Network.HTTP2.Client.RawConnection

Synopsis

Documentation

data RawHttp2Connection Source #

Constructors

RawHttp2Connection 

Fields

  • _sendRaw :: [ByteString] -> ClientIO ()

    Function to send raw data to the server.

  • _nextRaw :: Int -> ClientIO ByteString

    Function to block reading a datachunk of a given size from the server. An empty chunk when asking for a length larger than 0 means the underlying network session is closed. A compliant HTP2 server should have sent a GOAWAY before such an event occurs.

  • _close :: ClientIO ()
     

newRawHttp2Connection Source #

Arguments

:: HostName

Server's hostname.

-> PortNumber

Server's port to connect to.

-> Maybe ClientParams

TLS parameters. The onSuggestALPN hook is overwritten to always return ["h2", "h2-17"].

-> ClientIO RawHttp2Connection 

Initiates a RawHttp2Connection with a server.

The current code does not handle closing the connexion, yikes.

newRawHttp2ConnectionSocket Source #

Arguments

:: Socket

A connected socket.

-> Maybe ClientParams

TLS parameters. The onSuggestALPN hook is overwritten to always return ["h2", "h2-17"].

-> ClientIO RawHttp2Connection 

Initiates a RawHttp2Connection with a server over a connected socket.

The current code does not handle closing the connexion, yikes. Since 0.8.0.2