Next: , Up: Implementation

3.1 Server responses

OK [<arbitrary debugging information>]
Request was successful.
ERR errorcode [<human readable error description>]
Request could not be fulfilled. The possible error codes are defined by libgpg-error.
S keyword <status information depending on keyword>
Informational output by the server, still processing the request. A client may not send such lines to the server while processing an Inquiry command. keyword shall start with a letter or an underscore.
# <string>
Comment line issued only for debugging purposes. Totally ignored.
D <raw data>
Raw data returned to client. There must be exactly one space after the 'D'. The values for '%', CR and LF must be percent escaped; this is encoded as %25, %0D and %0A. Only uppercase letters should be used in the hexadecimal representation. Other characters may be percent escaped for easier debugging. All these Data lines are considered one data stream up to the OK or ERR response. Status and Inquiry Responses may be mixed with the Data lines.
INQUIRE keyword <parameters>
Server needs further information from the client. The client should answer with a command which is allowed after an inquiry. Note that the server does not confirm that client command but either continues processing or ends processing with an error status. Not all commands are allowed.

A client should only check the first letter of each line and then skip over to the next token (except for data lines where the raw data starts exactly after 2 bytes). Lines larger than 1000 bytes should be treated as a communication error. (The rationale for having a line length limit is to allow for easier multiplexing of several channels).