Client and server exchange binary game messages with each other in their simplest form. No json, I am sorry about that. Each message starts with a header:
struct message_header_t {
char type;
}
Every message is sent without alignment between structure members as if all the structures defined with pragma pack directive:
#pragma pack(push,1)
const char MSG_UNDEFINED = -1;
const char MSG_S2C_SERVER_INFO = 0;
const char MSG_C2S_PING = 1;
const char MSG_C2S_LOGIN = 2;
const char MSG_S2C_SIGN_REQUEST = 3;
const char MSG_C2S_SIGNATURE = 4;
const char MSG_S2C_GAME_STATE = 5;
const char MSG_C2S_JOIN = 6;
const char MSG_S2C_JOINED = 7;
const char MSG_S2C_UNIT_ENTER = 8;
const char MSG_S2C_MAP_TILE = 9;
const char MSG_C2S_UNIT_COMMAND = 10;
const char MSG_S2C_ERROR = 11;
const char MSG_S2C_UNIT_LEAVE = 12;
const char MSG_S2C_UNIT_STOP = 13;
const char MSG_S2C_UNIT_MOVE = 14;
const char MSG_C2S_GM = 15;
The simplest message is C2S::GM message and it consists of header only.