Safe Haskell | None |
---|---|
Language | Haskell2010 |
Language.Haskell.Tools.Daemon.Mode
Description
Defines different working modes for the daemon. It can work by using a socket connection or channels to communicate with the client. When the daemon is used by CLI, it uses channel if it communicates with an editor plugin it uses the socket connection.
Synopsis
- data WorkingMode a = WorkingMode {
- daemonConnect :: Int -> IO a
- daemonDisconnect :: a -> IO ()
- daemonSend :: a -> ResponseMsg -> IO ()
- daemonReceive :: a -> IO [Either String ClientMessage]
- socketMode :: WorkingMode (Socket, Socket)
- channelMode :: WorkingMode (Chan ResponseMsg, Chan ClientMessage)
Documentation
data WorkingMode a Source #
An abstraction over the connection to the client.
Constructors
WorkingMode | |
Fields
|
socketMode :: WorkingMode (Socket, Socket) Source #
Connect to the client running in a separate process using socket connection
channelMode :: WorkingMode (Chan ResponseMsg, Chan ClientMessage) Source #
Connect to the client running in the same process using a channel