| 1 | /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ |
| 2 | /* If you are missing that file, acquire a complete release at teeworlds.com. */ |
| 3 | #ifndef ENGINE_SHARED_PROTOCOL7_H |
| 4 | #define ENGINE_SHARED_PROTOCOL7_H |
| 5 | |
| 6 | #include <base/types.h> |
| 7 | |
| 8 | namespace protocol7 |
| 9 | { |
| 10 | enum |
| 11 | { |
| 12 | NETMSG_NULL = 0, |
| 13 | |
| 14 | // the first thing sent by the client |
| 15 | // contains the version info for the client |
| 16 | NETMSG_INFO, |
| 17 | |
| 18 | // sent by server |
| 19 | NETMSG_MAP_CHANGE, // sent when client should switch map |
| 20 | NETMSG_MAP_DATA, // map transfer, contains a chunk of the map file |
| 21 | NETMSG_SERVERINFO, |
| 22 | NETMSG_CON_READY, // connection is ready, client should send start info |
| 23 | NETMSG_SNAP, // normal snapshot, multiple parts |
| 24 | NETMSG_SNAPEMPTY, // empty snapshot |
| 25 | NETMSG_SNAPSINGLE, // ? |
| 26 | NETMSG_SNAPSMALL, // |
| 27 | NETMSG_INPUTTIMING, // reports how off the input was |
| 28 | NETMSG_RCON_AUTH_ON, // rcon authentication enabled |
| 29 | NETMSG_RCON_AUTH_OFF, // rcon authentication disabled |
| 30 | NETMSG_RCON_LINE, // line that should be printed to the remote console |
| 31 | NETMSG_RCON_CMD_ADD, |
| 32 | NETMSG_RCON_CMD_REM, |
| 33 | |
| 34 | NETMSG_UNUSED1, |
| 35 | NETMSG_UNUSED2, |
| 36 | |
| 37 | // sent by client |
| 38 | NETMSG_READY, // |
| 39 | NETMSG_ENTERGAME, |
| 40 | NETMSG_INPUT, // contains the inputdata from the client |
| 41 | NETMSG_RCON_CMD, // |
| 42 | NETMSG_RCON_AUTH, // |
| 43 | NETMSG_REQUEST_MAP_DATA, // |
| 44 | |
| 45 | NETMSG_UNUSED3, |
| 46 | NETMSG_UNUSED4, |
| 47 | |
| 48 | // sent by both |
| 49 | NETMSG_PING, |
| 50 | NETMSG_PING_REPLY, |
| 51 | NETMSG_UNUSED5, |
| 52 | |
| 53 | NETMSG_MAPLIST_ENTRY_ADD, // todo 0.8: move up |
| 54 | NETMSG_MAPLIST_ENTRY_REM, |
| 55 | }; |
| 56 | |
| 57 | enum |
| 58 | { |
| 59 | NET_CTRLMSG_KEEPALIVE = 0, |
| 60 | NET_CTRLMSG_CONNECT, |
| 61 | NET_CTRLMSG_ACCEPT, |
| 62 | NET_CTRLMSG_UNUSED, |
| 63 | NET_CTRLMSG_CLOSE, |
| 64 | NET_CTRLMSG_TOKEN, |
| 65 | }; |
| 66 | |
| 67 | enum |
| 68 | { |
| 69 | MAX_NAME_LENGTH = 16, |
| 70 | MAX_NAME_ARRAY_SIZE = MAX_NAME_LENGTH * UTF8_BYTE_LENGTH + 1, |
| 71 | MAX_CLAN_LENGTH = 12, |
| 72 | MAX_CLAN_ARRAY_SIZE = MAX_CLAN_LENGTH * UTF8_BYTE_LENGTH + 1, |
| 73 | MAX_SKIN_LENGTH = 24, |
| 74 | MAX_SKIN_ARRAY_SIZE = MAX_SKIN_LENGTH * UTF8_BYTE_LENGTH + 1, |
| 75 | }; |
| 76 | } |
| 77 | |
| 78 | #endif |
| 79 | |