Safe Haskell | None |
---|
- connect :: HostName -> PortNumber -> PublicKey -> PrivateKey -> IO Connection
- accept :: PortNumber -> PublicKey -> PrivateKey -> IO Connection
- keyExchangeInit :: Socket -> PublicKey -> PrivateKey -> IO (OutContext, InContext)
- keyExchangeResp :: Socket -> PublicKey -> PrivateKey -> IO (OutContext, InContext)
- send :: Connection -> ByteString -> IO ()
- recv :: Connection -> IO ByteString
- data Connection
- type HostName = String
- data PortNumber
Documentation
connect :: HostName -> PortNumber -> PublicKey -> PrivateKey -> IO ConnectionSource
Connect to the specified host and port, establishing a secure, authenticated connection with a party holding the public key.
accept :: PortNumber -> PublicKey -> PrivateKey -> IO ConnectionSource
Listen for and accept a connection on the host and port, establishing a secure, authenticated connection with a party holding the specified public key.
keyExchangeInit :: Socket -> PublicKey -> PrivateKey -> IO (OutContext, InContext)Source
keyExchangeInit sock them me
Act as the initiator in an authenticated key exchange using the socket
sock
as the communications channel, the public key them
to verify
the end point and the private key me
to prove ourself.
keyExchangeResp :: Socket -> PublicKey -> PrivateKey -> IO (OutContext, InContext)Source
keyExchangeResp sock them me
Act as the responder in an authenticated key exchange using the socket
sock
as the communications channel, the public key them
to verify
the end point and the private key me
to prove ourself.
send :: Connection -> ByteString -> IO ()
recv :: Connection -> IO ByteString
data Connection
A connection is a secure bidirectional communication channel.
Either a host name e.g., "haskell.org"
or a numeric host
address string consisting of a dotted decimal IPv4 address or an
IPv6 address e.g., "192.168.0.1"
.