| Portability | unknown |
|---|---|
| Stability | experimental |
| Maintainer | Vincent Hanquez <vincent@snarc.org> |
Network.TLS.Client
Description
the Client module contains the necessary calls to create a connecting TLS socket aka. a client socket.
- data TLSClientParams = TLSClientParams {
- cpConnectVersion :: Version
- cpAllowedVersions :: [Version]
- cpSession :: Maybe [Word8]
- cpCiphers :: [Cipher]
- cpCertificate :: Maybe Certificate
- data TLSStateClient
- runTLSClient :: TLSClient m a -> TLSClientParams -> SRandomGen -> m (a, TLSStateClient)
- recvPacket :: Handle -> TLSClient IO (Either TLSError Packet)
- sendPacket :: Handle -> Packet -> TLSClient IO ()
- connect :: Handle -> ClientRandom -> [Word8] -> TLSClient IO ()
- sendData :: Handle -> ByteString -> TLSClient IO ()
- recvData :: Handle -> TLSClient IO ByteString
- close :: Handle -> TLSClient IO ()
Documentation
data TLSClientParams Source
Constructors
| TLSClientParams | |
Fields
| |
Instances
data TLSStateClient Source
Instances
| Show TLSStateClient | |
| Monad m => MonadState TLSStateClient (TLSClient m) |
runTLSClient :: TLSClient m a -> TLSClientParams -> SRandomGen -> m (a, TLSStateClient)Source
low level packet sending receiving.
recvPacket :: Handle -> TLSClient IO (Either TLSError Packet)Source
receive a single TLS packet or on error a TLSError
API, warning probably subject to change
connect :: Handle -> ClientRandom -> [Word8] -> TLSClient IO ()Source
connect through a handle as a new TLS connection.
recvData :: Handle -> TLSClient IO ByteStringSource
recvData get data out of Data packet, and automatically try to renegociate if - a Handshake HelloRequest is received