Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 868 Bytes

File metadata and controls

25 lines (16 loc) · 868 Bytes

ga-PR340

build

Protocol

The server is expected to work on the following protocol: COMMAND [KEY] [VALUE]\n

All fields can be put into double quotes " to allow spaces. Double quotes inside a quoted string are escaped by a backslash \.

Responses are given as a newline \n terminated string. The following error responses can be returned:

  • NOT FOUND is returned by GET if the given KEY was not found.
  • OK is returned by SET after a KEY VALUE pair has been written.
  • INVALID COMMAND is returned if the given COMMAND is not known or could not be parsed.

The following commands are supported:

  • GET returns a VALUE for a given KEY. Example GET foo
  • SET stores a VALUE for a given KEY. Example SET foo bar
  • QUIT closes the connection