| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Simplex.Messaging.Transport.HTTP2.Client
Synopsis
- data HTTP2Client = HTTP2Client {
- action :: Maybe (Async HTTP2Response)
- sessionId :: SessionId
- sessionALPN :: Maybe ALPN
- serverKey :: Maybe APublicVerifyKey
- serverCerts :: CertificateChain
- sessionTs :: UTCTime
- sendReq :: Request -> (Response -> IO HTTP2Response) -> IO HTTP2Response
- client_ :: HClient
- data HClient = HClient {
- connected :: TVar Bool
- disconnected :: IO ()
- host :: TransportHost
- port :: ServiceName
- config :: HTTP2ClientConfig
- reqQ :: TBQueue (Request, TMVar HTTP2Response)
- data HTTP2Response = HTTP2Response {}
- data HTTP2ClientConfig = HTTP2ClientConfig {
- qSize :: Natural
- connTimeout :: Int
- transportConfig :: TransportClientConfig
- bufferSize :: BufferSize
- bodyHeadSize :: Int
- suportedTLSParams :: Supported
- data HTTP2ClientError
- = HCResponseTimeout
- | HCNetworkError NetworkError
- | HCIOError IOException
- defaultHTTP2ClientConfig :: HTTP2ClientConfig
- getHTTP2Client :: HostName -> ServiceName -> Maybe CertificateStore -> HTTP2ClientConfig -> IO () -> IO (Either HTTP2ClientError HTTP2Client)
- getVerifiedHTTP2Client :: Maybe SocksCredentials -> TransportHost -> ServiceName -> Maybe KeyHash -> Maybe CertificateStore -> HTTP2ClientConfig -> IO () -> IO (Either HTTP2ClientError HTTP2Client)
- attachHTTP2Client :: forall p. TransportPeerI p => HTTP2ClientConfig -> TransportHost -> ServiceName -> IO () -> Int -> TLS p -> IO (Either HTTP2ClientError HTTP2Client)
- closeHTTP2Client :: HTTP2Client -> IO ()
- sendRequest :: HTTP2Client -> Request -> Maybe Int -> IO (Either HTTP2ClientError HTTP2Response)
- sendRequestDirect :: HTTP2Client -> Request -> Maybe Int -> IO (Either HTTP2ClientError HTTP2Response)
Documentation
data HTTP2Client Source #
Constructors
| HTTP2Client | |
Fields
| |
Constructors
| HClient | |
Fields
| |
data HTTP2Response Source #
Constructors
| HTTP2Response | |
data HTTP2ClientConfig Source #
Constructors
| HTTP2ClientConfig | |
Fields
| |
Instances
| Show HTTP2ClientConfig Source # | |
Defined in Simplex.Messaging.Transport.HTTP2.Client Methods showsPrec :: Int -> HTTP2ClientConfig -> ShowS show :: HTTP2ClientConfig -> String showList :: [HTTP2ClientConfig] -> ShowS | |
data HTTP2ClientError Source #
Constructors
| HCResponseTimeout | |
| HCNetworkError NetworkError | |
| HCIOError IOException |
Instances
| Show HTTP2ClientError Source # | |
Defined in Simplex.Messaging.Transport.HTTP2.Client Methods showsPrec :: Int -> HTTP2ClientError -> ShowS show :: HTTP2ClientError -> String showList :: [HTTP2ClientError] -> ShowS | |
getHTTP2Client :: HostName -> ServiceName -> Maybe CertificateStore -> HTTP2ClientConfig -> IO () -> IO (Either HTTP2ClientError HTTP2Client) Source #
getVerifiedHTTP2Client :: Maybe SocksCredentials -> TransportHost -> ServiceName -> Maybe KeyHash -> Maybe CertificateStore -> HTTP2ClientConfig -> IO () -> IO (Either HTTP2ClientError HTTP2Client) Source #
attachHTTP2Client :: forall p. TransportPeerI p => HTTP2ClientConfig -> TransportHost -> ServiceName -> IO () -> Int -> TLS p -> IO (Either HTTP2ClientError HTTP2Client) Source #
closeHTTP2Client :: HTTP2Client -> IO () Source #
Disconnects client from the server and terminates client threads.
sendRequest :: HTTP2Client -> Request -> Maybe Int -> IO (Either HTTP2ClientError HTTP2Response) Source #
sendRequestDirect :: HTTP2Client -> Request -> Maybe Int -> IO (Either HTTP2ClientError HTTP2Response) Source #
this function should not be used until HTTP2 is thread safe, use sendRequest