CommandsRegistry

ditto

Members

Aliases

Handler
alias Handler = void delegate(cstring[], void delegate(cstring))

Alias for our non-interactive handler delegate.

InteractiveHandler
alias InteractiveHandler = void delegate(cstring[], void delegate(cstring), void delegate(ref mstring))

Alias for our interactive handler delegate.

RawSocketHandler
alias RawSocketHandler = void delegate(cstring[], void delegate(cstring), void delegate(ref mstring), IODevice socket)

Alias for the type of handler delegate which accepts the socket instance for direct control over it

Functions

addHandler
void addHandler(istring command, Handler handler)

Register a command and a handler the registry.

addHandler
void addHandler(istring command, RawSocketHandler handler)

Registers a command and the raw socket handler with the registry

addHandler
void addHandler(istring command, InteractiveHandler handler)

Register a command and interactive handler to the unix listener.

handle
void handle(cstring command, cstring args, void delegate(cstring) send_response, void delegate(ref mstring buf) wait_reply, IODevice socket)

Receives all commands from the socket and splits the command by " ". If a matching command is registered then the command will be called with the remaining arguments. This method will be called by the UnixSocketListener whenever a command is received.

removeHandler
void removeHandler(istring command)

Register a command and handler to the unix listener.

Meta