Copyright | (c) 2015 2016 2017 2018 Athan Clark |
---|---|
License | BSD-style |
Maintainer | athan.clark@gmail.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
Network.WebSockets.Trans
Contents
- type ServerAppT m = PendingConnection -> m ()
- liftServerApp :: MonadIO m => ServerApp -> ServerAppT m
- runServerAppT :: MonadBaseControl IO m stM => Extractable stM => ServerAppT m -> m ServerApp
- type ClientAppT m a = Connection -> m a
- liftClientApp :: MonadIO m => ClientApp a -> ClientAppT m a
- runClientAppT :: MonadBaseControl IO m stM => Extractable stM => ClientAppT m a -> m (ClientApp a)
- websocketsOrT :: MonadBaseControl IO m stM => Extractable stM => ConnectionOptions -> ServerAppT m -> MiddlewareT m
Websockets
type ServerAppT m = PendingConnection -> m () Source #
Arguments
:: MonadIO m | |
=> ServerApp | To lift |
-> ServerAppT m |
Arguments
:: MonadBaseControl IO m stM | |
=> Extractable stM | |
=> ServerAppT m | To run |
-> m ServerApp |
type ClientAppT m a = Connection -> m a Source #
Arguments
:: MonadIO m | |
=> ClientApp a | To lift |
-> ClientAppT m a |
Arguments
:: MonadBaseControl IO m stM | |
=> Extractable stM | |
=> ClientAppT m a | To run |
-> m (ClientApp a) |
WAI Compatability
Arguments
:: MonadBaseControl IO m stM | |
=> Extractable stM | |
=> ConnectionOptions | |
-> ServerAppT m | Server |
-> MiddlewareT m |
Respond with the WebSocket server when applicable, as a middleware