[wiki:neercs << back to neercs] = The neercs client-server protocol = '''Still being designed.''' High level client-to-server commands: * '''`CONNECT`''': establish a connection with the server, with optional connection credentials * '''`ATTACH %d`''': attach to window with ID $1 * '''`DETACH %d`''': detach from window with ID $1 * '''`NEW %s`''': open a new process window, running either a new shell or the optional command line `$1` * '''`BROWSE`''': open a process browser window * '''`GRAB %d %d`''': grab process `$2` and replace process browser window `$1` with it * '''`KILL %d`''': kill window with ID `$1` * '''`DISCONNECT`''': close the connection with the server Low level client-to-server commands: * '''`KEY %d ...`''': send one or several keystrokes for window with ID `$1` * '''`MOUSE %d ...`''': send a mouse event (motion, button press or release) for window with ID `$1` * '''`RESIZE %d ...`''': send a resize event for window with ID `$1` * '''`ACTIVE %d ...`''': set the active refresh area for window with ID `$1` == Legacy commands == The first neercs implementation used the following set of commands. Client to server: * `ATTACH %d %d %d`: attach client with a $1x$2 display and refresh delay $3 * `QUIT`: quit everything * `DELAY %d`: update refresh delay * `RESIZE %d %d`: change display size * `KEY %d`: key $1 pressed * `MOUSEP %d %d %d`: mouse button $3 pressed at $1,$2 * `MOUSER %d %d %d`: mouse button $3 released at $1,$2 * `MOUSEM %d %d %d`: mouse motion to $1,$2 with button $3 pressed Server to client: * `TITLE %d %s`: change display title for window `$1` to `"$2"` * `CURSOR %d %d`: set cursor visibility for window `$1` to `$2` * `UPDATE %d %d %s`: upload part of a window, caca canvas $3 starting at $1,$2 * `REFRESH %d %d`: refresh display, with cursor at $1,$2 (sent after all updates, when client should be consistent) * `DETACH`