| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
SecondTransfer.TLS.Types
- data FinishRequest = FinishRequest
- type ProtocolSelector = [ByteString] -> IO (Maybe Int)
- class IOChannels session => TLSContext ctx session | ctx -> session, session -> ctx where
- newTLSContextFromMemory :: ByteString -> ByteString -> ProtocolSelector -> IO ctx
- newTLSContextFromCertFileNames :: ByteString -> ByteString -> ProtocolSelector -> IO ctx
- unencryptTLSServerIO :: forall cipherio. TLSServerIO cipherio => ctx -> cipherio -> IO session
- getSelectedProtocol :: session -> IO (Maybe (Int, ByteString))
- newtype ConnectionId = ConnectionId Int64
- data ConnectionEvent
- data ConnectionCallbacks = ConnectionCallbacks {
- _logEvents_CoCa :: Maybe LogCallback
- logEvents_CoCa :: Iso' ConnectionCallbacks (Maybe LogCallback)
- defaultConnectionCallbacks :: ConnectionCallbacks
Documentation
data FinishRequest
Singleton type. Used in conjunction with an MVar. If the MVar is full,
the fuction tlsServeWithALPNAndFinishOnRequest knows that it should finish
at its earliest convenience and call the CloseAction for any open sessions.
Constructors
| FinishRequest |
type ProtocolSelector = [ByteString] -> IO (Maybe Int)
Given a list of ALPN identifiers, if something is suitable, return it.
class IOChannels session => TLSContext ctx session | ctx -> session, session -> ctx where
Types implementing this class are able to say a little bit about their peer.
Methods
newTLSContextFromMemory :: ByteString -> ByteString -> ProtocolSelector -> IO ctx
newTLSContextFromCertFileNames :: ByteString -> ByteString -> ProtocolSelector -> IO ctx
unencryptTLSServerIO :: forall cipherio. TLSServerIO cipherio => ctx -> cipherio -> IO session
getSelectedProtocol :: session -> IO (Maybe (Int, ByteString))
Instances
data ConnectionEvent
Connection events
Constructors
| Established_CoEv SockAddr ConnectionId Int64 | New connection. The second member says how many live connections are now |
| ALPNFailed_CoEv ConnectionId | An ALPN negotiation failed |
| Ended_CoEv ConnectionId | A connection ended. |
data ConnectionCallbacks
Callbacks used by client applications to get notified about interesting events happening at a connection level, or to get asked about things (e.g, about if it is proper to accept a connection). These are used from CoreServer
Constructors
| ConnectionCallbacks | |
Fields
| |
logEvents_CoCa :: Iso' ConnectionCallbacks (Maybe LogCallback)
defaultConnectionCallbacks :: ConnectionCallbacks
Default connections callback. Empty