What are Commands?
Everything sent between the client and the server is in the form of a command. Commands are represented with a three letter, all-caps, command code. All normal commands have a transaction ID (explained below) and end with a newline (also explained below). Commands sent by the client will generally cause the server to respond with one or more commands. There are four special types of commands which behave slightly differently than normal commands. Payload Commands span over multiple lines. Error commands have numbers instead of letters in their command code. Asynchronous commands are sent by the server without the client explicitly requesting them, and do not contain transaction IDs. Finally, the PNG command and some SYN responses don’t contain transaction IDs.