(dmd comm) module provides primitives that allow clients such
deco to connect to
dmd and send it commands to
control or change its behavior (see actions of
Currently, clients may only send commands, represented by the
<dmd-command> type. Each command specifies a service it applies
to, an action name, a list of strings to be used as arguments, and a
working directory. Commands are instantiated with
Return a new command (a
<dmd-command>) object for action on
Commands may then be written to or read from a communication channel with the following procedures:
Write command to port.
Receive a command from port and return it.
In practice, communication with
dmd takes place over a
Unix-domain socket, as discussed earlier (see Invoking dmd).
Clients may open a connection with the procedure below.
Open a connection to the daemon, using the Unix-domain socket at file, and return the socket.
When file is omitted, the default socket is used.
The daemon writes output to be logged or passed to the
currently-connected client using
This procedure should be used for all output operations in dmd. It outputs the args according to the format-string, then inserts a newline. It writes to whatever is the main output target of dmd, which might be multiple at the same time in future versions.