module Network.TLS.Session
( SessionManager(..)
, noSessionManager
) where
import Network.TLS.Types
data SessionManager = SessionManager
{
SessionManager -> SessionID -> IO (Maybe SessionData)
sessionResume :: SessionID -> IO (Maybe SessionData)
, SessionManager -> SessionID -> IO (Maybe SessionData)
sessionResumeOnlyOnce :: SessionID -> IO (Maybe SessionData)
, SessionManager -> SessionID -> SessionData -> IO ()
sessionEstablish :: SessionID -> SessionData -> IO ()
, SessionManager -> SessionID -> IO ()
sessionInvalidate :: SessionID -> IO ()
}
noSessionManager :: SessionManager
noSessionManager :: SessionManager
noSessionManager = SessionManager :: (SessionID -> IO (Maybe SessionData))
-> (SessionID -> IO (Maybe SessionData))
-> (SessionID -> SessionData -> IO ())
-> (SessionID -> IO ())
-> SessionManager
SessionManager
{ sessionResume :: SessionID -> IO (Maybe SessionData)
sessionResume = \SessionID
_ -> Maybe SessionData -> IO (Maybe SessionData)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe SessionData
forall a. Maybe a
Nothing
, sessionResumeOnlyOnce :: SessionID -> IO (Maybe SessionData)
sessionResumeOnlyOnce = \SessionID
_ -> Maybe SessionData -> IO (Maybe SessionData)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe SessionData
forall a. Maybe a
Nothing
, sessionEstablish :: SessionID -> SessionData -> IO ()
sessionEstablish = \SessionID
_ SessionData
_ -> () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
, sessionInvalidate :: SessionID -> IO ()
sessionInvalidate = \SessionID
_ -> () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
}