| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
DMQ.Protocol.LocalMsgNotification.Server
Description
A higher level API to implement server for local message notification miniprotocol.
For execution, localMsgNotificationServerPeer reinterprets this high level
description into the underlying typed protocol representation.
Synopsis
- newtype LocalMsgNotificationServer (m :: Type -> Type) msg a = LocalMsgNotificationServer (m (ServerIdle m msg a))
- data ServerIdle (m :: Type -> Type) msg a = ServerIdle {
- msgRequestHandler :: forall (blocking :: StBlockingStyle). SingBlockingStyle blocking -> m (ServerResponse m blocking msg a)
- msgDoneHandler :: !(m a)
- data ServerResponse (m :: Type -> Type) (blocking :: StBlockingStyle) msg a where
- ServerReply :: forall (blocking :: StBlockingStyle) msg (m :: Type -> Type) a. BlockingReplyList blocking msg -> HasMore -> ServerIdle m msg a -> ServerResponse m blocking msg a
- localMsgNotificationServerPeer :: forall (m :: Type -> Type) msg a. Monad m => LocalMsgNotificationServer m msg a -> Server (LocalMsgNotification msg) 'NonPipelined ('StIdle :: LocalMsgNotification msg) m a
Server API types
newtype LocalMsgNotificationServer (m :: Type -> Type) msg a Source #
The high level server wrapper
Constructors
| LocalMsgNotificationServer (m (ServerIdle m msg a)) |
data ServerIdle (m :: Type -> Type) msg a Source #
The server high level message handlers
Constructors
| ServerIdle | |
Fields
| |
data ServerResponse (m :: Type -> Type) (blocking :: StBlockingStyle) msg a where Source #
The server high level response type
Constructors
| ServerReply | The server provides a response to the client's query |
Fields
| |
Translates the server into a typed protocol
localMsgNotificationServerPeer :: forall (m :: Type -> Type) msg a. Monad m => LocalMsgNotificationServer m msg a -> Server (LocalMsgNotification msg) 'NonPipelined ('StIdle :: LocalMsgNotification msg) m a Source #
tranlates the server into the typed protocol representation