Safe Haskell | None |
---|
- connect :: HostName -> PortNumber -> [PublicKey] -> PrivateKey -> IO (PublicKey, Connection)
- accept :: PortNumber -> [PublicKey] -> PrivateKey -> Maybe HostName -> IO (PublicKey, Connection)
- send :: Connection -> ByteString -> IO ()
- recv :: Connection -> IO ByteString
- data Connection = Conn {
- inCtx :: MVar InContext
- outCtx :: MVar OutContext
- socket :: Socket
- socketAddr :: SockAddr
- close :: Connection -> IO ()
- type HostName = String
- data PortNumber
Documentation
connect :: HostName -> PortNumber -> [PublicKey] -> PrivateKey -> IO (PublicKey, Connection)Source
Connect to the specified host and port, establishing a secure, authenticated connection with a party holding the public key.
accept :: PortNumber -> [PublicKey] -> PrivateKey -> Maybe HostName -> IO (PublicKey, Connection)Source
Listen for and accept a connection on the host and port, establishing a secure, authenticated connection with a party holding the specified public key.
send :: Connection -> ByteString -> IO ()
Send a datagram, first encrypting it, using the given secure connection.
recv :: Connection -> IO ByteString
data Connection
A connection is a secure bidirectional communication channel.
Conn | |
|
close :: Connection -> IO ()
Close a connection