diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-11-26 09:49:07 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-11-26 09:49:07 +0200 |
commit | 197542c7ec19b41e865be1e84c6c6898de8514d1 (patch) | |
tree | 79554122d141ca79ec3885492e67a0bc526aadd0 /src/clientserver.h | |
parent | ab507f83e2e0b1f442341724bc47a8480667628e (diff) | |
download | dragonfireclient-197542c7ec19b41e865be1e84c6c6898de8514d1.tar.xz |
New PROTOCOL_VERSION scheme (allow client to support a range of versions)
Diffstat (limited to 'src/clientserver.h')
-rw-r--r-- | src/clientserver.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/clientserver.h b/src/clientserver.h index ba535a66b..b7e64d295 100644 --- a/src/clientserver.h +++ b/src/clientserver.h @@ -75,8 +75,14 @@ with this program; if not, write to the Free Software Foundation, Inc., GENERIC_CMD_SET_ATTACHMENT */ -#define PROTOCOL_VERSION 14 +// Server always only supports one version +#define SERVER_PROTOCOL_VERSION 14 +// Client can support older versions too +#define CLIENT_PROTOCOL_VERSION_MIN 13 +#define CLIENT_PROTOCOL_VERSION_MAX SERVER_PROTOCOL_VERSION + +// Constant that differentiates the protocol from random data and other protocols #define PROTOCOL_ID 0x4f457403 #define PASSWORD_SIZE 28 // Maximum password length. Allows for @@ -350,7 +356,8 @@ enum ToServerCommand [2] u8 SER_FMT_VER_HIGHEST [3] u8[20] player_name [23] u8[28] password (new in some version) - [51] u16 client network protocol version (new in some version) + [51] u16 minimum supported network protocol version (added sometime) + [53] u16 maximum supported network protocol version (added later than the previous one) */ TOSERVER_INIT2 = 0x11, |