Next: Others, Previous: Errors, Up: Misc Facilities [Contents][Index]
The (dmd comm)
module provides primitives that allow clients such
as deco
to connect to dmd
and send it commands to
control or change its behavior (see actions of
services).
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 dmd-command
:
Return a new command (a <dmd-command>
) object for action on
service.
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 local-output
:
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.
Next: Others, Previous: Errors, Up: Misc Facilities [Contents][Index]