Version 6 (modified by 14 years ago) (diff) | ,
---|
The neercs client-server protocol
High level client-to-server commands:
- CONNECT: establish a connection with the server
- out: optional connection credentials
- in: current list of window IDs
- NEW: open a new process window
- out: optional command line (otherwise, a new shell is spawned)
- in: ID of the new window
- BROWSE: open a process browser window
- in: ID of the new window
- GRAB: replace a process browser with the given process
- out: PID of the process to grab
- KILL: kill any window
- out: ID of the window to kill
- DISCONNECT: close the connection with the server
Low level client-to-server commands:
- KEY: send a keystroke for a given window
- out: ID of the window, keystroke information
- MOUSE: send a mouse event (motion, button press or release) for a given window
- out: ID of the window, mouse event information
- RESIZE: send a resize event for a given window
- out: ID of the window, resize information
- ACTIVE: set the active refresh area for a given window.
- out: ID of the window, area information
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 $3QUIT
: quit everythingDELAY %d
: update refresh delayRESIZE %d %d
: change display sizeKEY %d
: key $1 pressedMOUSEP %d %d %d
: mouse button $3 pressed at $1,$2MOUSER %d %d %d
: mouse button $3 released at $1,$2MOUSEM %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,$2REFRESH %d %d
: refresh display, with cursor at $1,$2 (sent after all updates, when client should be consistent)DETACH