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