Version 5 (modified by Sam Hocevar, 13 years ago) (diff)

--

<< back to neercs

The neercs client-server protocol

High level client-to-server commands:

  • Establish a connection with the server
    • out: optional connection credentials
    • in: current list of window IDs
  • Open a new process window
    • out: optional command line (otherwise, a new shell is spawned)
    • in: ID of the new window
  • Open a process browser window
    • in: ID of the new window
  • Replace a process browser with the given process
    • out: PID of the process to grab
  • Kill any window
    • out: ID of the window to kill
  • Close the connection with the server

Low level client-to-server commands:

  • Send a keystroke for a given window
    • out: ID of the window, keystroke information
  • Send a mouse event (motion, button press or release) for a given window
    • out: ID of the window, mouse event information
  • Send a resize event for a given window
    • out: ID of the window, resize information
  • 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 $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