Thinking about the protocol, I'm thinking about extendability. The client should be able to present commands it knows during handshake. Each feature of the API should have a version that is supported.
All commands should have three top level entries in it's envelope:
- c — command is a string representation of the command you whish to execute through RPC. Max length of this parameter is 20 byte characters
- t — a server generated token specific for each connected client that is passed out on each response and consumed for each client request. TODO: Specify the data type of the token and length
- d — arbitrary data in a json object that the command for this version should know how to execute.