Copyright | (c) simplex.chat |
---|---|
License | AGPL-3 |
Maintainer | chat@simplex.chat |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
This module defines SMP protocol server with in-memory persistence and optional append only log of SMP queue records.
See https://github.com/simplex-chat/simplexmq/blob/master/protocol/simplex-messaging.md
Synopsis
- runSMPServer :: (MonadRandom m, MonadUnliftIO m) => ServerConfig -> m ()
- runSMPServerBlocking :: (MonadRandom m, MonadUnliftIO m) => TMVar Bool -> ServerConfig -> m ()
Documentation
runSMPServer :: (MonadRandom m, MonadUnliftIO m) => ServerConfig -> m () Source #
Runs an SMP server using passed configuration.
See a full server here: https://github.com/simplex-chat/simplexmq/blob/master/apps/smp-server/Main.hs
runSMPServerBlocking :: (MonadRandom m, MonadUnliftIO m) => TMVar Bool -> ServerConfig -> m () Source #
Runs an SMP server using passed configuration with signalling.
This function uses passed TMVar to signal when the server is ready to accept TCP requests (True) and when it is disconnected from the TCP socket once the server thread is killed (False).