6.1.1. Control sockets

The server programs have a control socket (Unix domain) as specified by environment.controlsocket.path.

All connections begin with a version handshake (two bytes, ASCII char 6 and 2 for version ‘6.2’), follow by one or more request and responses. All requests are sent beginning with a command identifier (one byte, ASCII char). The command identifiers are assigned in alphabetical order. In requests with a Protobuf request body, the command identifier is followed by a binary host packed (LE) unsigned 64 bit integer telling the size of the request body.

The response begins with one byte indicating the status; + for success, or E for error. It is followed by a binary host (LE) packed unsigned 64 bit integer telling the size the response data that follows. In the success case, the data is a Protobuf response body. In the error case, it is an ASCII string.