Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This main module provides APIs for QUIC servers.
Synopsis
- run :: ServerConfig -> (Connection -> IO ()) -> IO ()
- stop :: Connection -> IO ()
- data ServerConfig
- defaultServerConfig :: ServerConfig
- scAddresses :: ServerConfig -> [(IP, PortNumber)]
- scALPN :: ServerConfig -> Maybe (Version -> [ByteString] -> IO ByteString)
- scRequireRetry :: ServerConfig -> Bool
- scUse0RTT :: ServerConfig -> Bool
- scCiphers :: ServerConfig -> [Cipher]
- scGroups :: ServerConfig -> [Group]
- scVersions :: ServerConfig -> [Version]
- scCredentials :: ServerConfig -> Credentials
- scSessionManager :: ServerConfig -> SessionManager
- clientCertificateChain :: Connection -> IO (Maybe CertificateChain)
Running a QUIC server
run :: ServerConfig -> (Connection -> IO ()) -> IO () Source #
Running a QUIC server. The action is executed with a new connection in a new lightweight thread.
stop :: Connection -> IO () Source #
Stopping the base thread of the server.
Configuration
data ServerConfig Source #
Server configuration.
defaultServerConfig :: ServerConfig Source #
The default value for server configuration.
scAddresses :: ServerConfig -> [(IP, PortNumber)] Source #
Server addresses assigned to used network interfaces.
scALPN :: ServerConfig -> Maybe (Version -> [ByteString] -> IO ByteString) Source #
ALPN handler.
scRequireRetry :: ServerConfig -> Bool Source #
Requiring QUIC retry.
scUse0RTT :: ServerConfig -> Bool Source #
Use 0-RTT on the 2nd connection if possible. server original
scCiphers :: ServerConfig -> [Cipher] Source #
Cipher candidates defined in TLS 1.3.
scGroups :: ServerConfig -> [Group] Source #
Key exchange group candidates defined in TLS 1.3.
scVersions :: ServerConfig -> [Version] Source #
Fully-Deployed Versions in the preferred order.
scCredentials :: ServerConfig -> Credentials Source #
Server certificate information.
scSessionManager :: ServerConfig -> SessionManager Source #
A session manager of TLS 1.3.
Certificate
clientCertificateChain :: Connection -> IO (Maybe CertificateChain) Source #
Getting a certificate chain of a client.