Portability | unknown |
---|---|
Stability | experimental |
Maintainer | Vincent Hanquez <vincent@snarc.org> |
the Server module contains the necessary calls to create a listening TLS socket aka. a server socket.
- data TLSServerParams = TLSServerParams {
- spAllowedVersions :: [Version]
- spSessions :: [[Word8]]
- spCiphers :: [Cipher]
- spCertificate :: Maybe TLSServerCert
- spWantClientCert :: Bool
- spCallbacks :: TLSServerCallbacks
- data TLSServerCallbacks = TLSServerCallbacks {
- cbCertificates :: Maybe ([Certificate] -> IO Bool)
- data TLSStateServer
- runTLSServer :: TLSServer m a -> TLSServerParams -> SRandomGen -> m (a, TLSStateServer)
- recvPacket :: Handle -> TLSServer IO (Either TLSError [Packet])
- sendPacket :: Handle -> Packet -> TLSServer IO ()
- listen :: Handle -> TLSServer IO ()
- sendData :: Handle -> ByteString -> TLSServer IO ()
- recvData :: Handle -> TLSServer IO ByteString
- close :: Handle -> TLSServer IO ()
Documentation
data TLSServerParams Source
TLSServerParams | |
|
data TLSServerCallbacks Source
TLSServerCallbacks | |
|
data TLSStateServer Source
Monad m => MonadState TLSStateServer (TLSServer m) |
runTLSServer :: TLSServer m a -> TLSServerParams -> SRandomGen -> m (a, TLSStateServer)Source
low level packet sending receiving.
recvPacket :: Handle -> TLSServer IO (Either TLSError [Packet])Source
receive a single TLS packet or on error a TLSError
API, warning probably subject to change
recvData :: Handle -> TLSServer IO ByteStringSource
recvData get data out of Data packet, and automatically renegociate if - a Handshake ClientHello is received