-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | In-memory TLS session manager
--   
--   TLS session manager with limitation, automatic pruning, energy saving
--   and replay resistance
@package tls-session-manager
@version 0.0.0.1


-- | In-memory TLS session manager.
--   
--   <ul>
--   <li>Limitation: you can set the maximum size of the session data
--   database.</li>
--   <li>Automatic pruning: old session data over their lifetime are pruned
--   automatically.</li>
--   <li>Energy saving: no dedicate pruning thread is running when the size
--   of session data database is zero.</li>
--   <li>(Replay resistance: each session data is used at most once to
--   prevent replay attacks against 0RTT early data of TLS 1.3.)</li>
--   </ul>
module Network.TLS.SessionManager

-- | Configuration for session managers.
data Config
Config :: !Int -> !Int -> !Int -> Config

-- | Ticket lifetime in seconds.
[ticketLifetime] :: Config -> !Int

-- | Pruning delay in seconds. This is set to <a>reaperDelay</a>.
[pruningDelay] :: Config -> !Int

-- | The limit size of session data entries.
[dbMaxSize] :: Config -> !Int

-- | Lifetime: 1 day , delay: 10 minutes, limit: 10,000 entries.
defaultConfig :: Config

-- | Creating an in-memory session manager.
newSessionManager :: Config -> IO SessionManager
