Server Messages

General

GET_SERVER_TIME S(1000) serverid clientid

Request server time. Use this for basic echo testing.

GET_SERVER_TIME_RESPONSE C(1000) clientid serverid time8
REMOVE_SERVER S(1005) serverid code

Sent to the client when a server other than the immediate server has disconnected. Removal announcements for all downstream terminals and servers should be sent prior to receiving this message, but clients must gracefully handle a bad ordering.

CREATE_TERM S(1006) serverid clientid termid width height key+value...

Create a terminal.

  • serverid (16): The destination server identifier.
  • clientid (16): The originating client identifier.
  • termid (16): The terminal identifier for the new terminal. Randomly generating this is recommended.
  • width (4): The width of the new terminal in character cells.
  • height (4): The height of the new terminal in character cells.
  • key+value: The new terminal's attributes as NUL-terminated UTF-8 strings.
MONITOR_INPUT S(1023) serverid clientid data

Send input to the monitor process.

  • serverid (16): The destination server identifier.
  • clientid (16): The originating client identifier.
  • data: The UTF-8 string to write. A newline will be appended by the server before writing.

Attributes

GET_SERVER_ATTRIBUTES S(1001) serverid clientid

Request server attributes. Attribute names starting with underscore (_) will not be included in the response.

SERVER_ATTRIBUTES_RESPONSE C(1001) clientid serverid key+value...
GET_SERVER_ATTRIBUTE S(1002) serverid clientid key...

Request one or more server attributes. A separate response will be sent for each requested attribute.

  • serverid (16): The destination server identifier.
  • clientid (16): The originating client identifier.
  • key: The requested attribute name(s) as NUL-terminated UTF-8 strings.
SERVER_ATTRIBUTE_CHANGED S(1002) serverid key[+value]

Sent to the client when a server attribute has changed.

  • serverid (16): The originating server identifier.
  • key[+value]: The attribute name and optional value as NUL-terminated UTF-8 strings. If the value is absent, the attribute was removed.
SERVER_ATTRIBUTE_RESPONSE C(1002) clientid serverid key[+value]

As SERVER_ATTRIBUTE_CHANGED, but includes the identifier of the requesting client.

SET_SERVER_ATTRIBUTE S(1003) serverid clientid key+value...

Set one or more server attributes. This will cause SERVER_ATTRIBUTE_CHANGED messages to be sent to all clients unless the attribute(s) did not change.

  • serverid (16): The destination server identifier.
  • clientid (16): The originating client identifier.
  • key+value: The attribute names and new values as NUL-terminated UTF-8 strings.
REMOVE_SERVER_ATTRIBUTE S(1004) serverid clientid key...

Remove one or more server attributes. This will cause SERVER_ATTRIBUTE_CHANGED messages to be sent to all clients unless the attribute(s) did not change.

  • serverid (16): The destination server identifier.
  • clientid (16): The originating client identifier.
  • key: The attribute name(s) to remove as NUL-terminated UTF-8 strings.

Task Management

TASK_INPUT S(1008) serverid clientid taskid data

Send input data for a task.

TASK_OUTPUT C(1008) clientid serverid taskid data

Output data for a task.

TASK_QUESTION C(1009) clientid serverid taskid question

Sent to the client when a task requires user input. The client should reply with an answer.

TASK_ANSWER S(1009) serverid clientid taskid answer

The answer to a TASK_QUESTION.

CANCEL_TASK S(1010) serverid clientid taskid

Cancel a task.

File Tasks

UPLOAD_FILE S(1011) serverid clientid taskid chunksize mode config name

Create a task to upload a file.

TODO more documentation.

  • serverid (16): The destination server identifier.
  • clientid (16): The originating client identifier.
  • taskid (16): The task identifier.
  • chunksize (4): The chunk size.
  • mode (4): The permissions for the new file.
  • config (4): A code specifying how to handle an existing file with the same name. The high-order bit, if set, indicates that directories leading up to the file should be created if necessary.
  • name: The absolute path where the file should be created on the server.
DOWNLOAD_FILE S(1012) serverid clientid taskid chunksize windowsize name

Create a task to download a file.

TODO more documentation.

  • serverid (16): The destination server identifier.
  • clientid (16): The originating client identifier.
  • taskid (16): The task identifier.
  • chunksize (4): The chunk size.
  • windowsize (4): The window size.
  • name: The absolute path to the file on the server.
DELETE_FILE S(1013) serverid clientid taskid config name

Create a task to delete a file or folder (recursively).

TODO more documentation.

RENAME_FILE S(1014) serverid clientid taskid config name dest

Create a task to rename a file or folder.

TODO more documentation.

  • serverid (16): The destination server identifier.
  • clientid (16): The originating client identifier.
  • taskid (16): The task identifier.
  • config (4): A code specifying how to handle an existing file with the same name.
  • name: The absolute path to the existing file on the server.
  • dest: The absolute path to the new name on the server.

Pipe Tasks

UPLOAD_PIPE S(1015) serverid clientid taskid chunksize mode

Create a task to pipe data to a FIFO on the server.

TODO more documentation.

DOWNLOAD_PIPE S(1016) serverid clientid taskid chunksize windowsize mode

Create a task to pipe data from a FIFO on the server.

TODO more documentation.

CONNECTING_PORTFWD S(1017) serverid clientid taskid chunksize windowsize type addr

Create a port forwarding task connecting out from the server.

TODO more documentation.

  • serverid (16): The destination server identifier.
  • clientid (16): The originating client identifier.
  • taskid (16): The task identifier.
  • chunksize (4): The chunk size.
  • windowsize (4): The window size.
  • type (4): The type of socket (TCP or Unix-domain).
  • addr: The socket address to connect to.
LISTENING_PORTFWD S(1018) serverid clientid taskid chunksize windowsize type addr

Create a port forwarding task listening on the server.

TODO more documentation.

  • serverid (16): The destination server identifier.
  • clientid (16): The originating client identifier.
  • taskid (16): The task identifier.
  • chunksize (4): The chunk size.
  • windowsize (4): The window size.
  • type (4): The type of socket (TCP or Unix-domain).
  • addr: The socket address to listen on.

Execute Tasks

RUN_COMMAND S(1019) serverid clientid taskid chunksize windowsize key+value...

Create a task to execute a command.

TODO more documentation.

  • serverid (16): The destination server identifier.
  • clientid (16): The originating client identifier.
  • taskid (16): The task identifier.
  • chunksize (4): The chunk size.
  • windowsize (4): The window size.
  • key+value: Task configuration as NUL-terminated UTF-8 strings.
RUN_CONNECT S(1020) serverid clientid taskid key+value...

Create a task to establish a new connection by executing a command.

TODO more documentation.

Mount Tasks

MOUNT_FILE_READWRITE S(1021) serverid clientid taskid key+value...

Create a task to mount a file.

TODO more documentation.

MOUNT_FILE_READONLY S(1022) serverid clientid taskid key+value...

Create a task to mount a file or directory tree read-only.

TODO more documentation.