(svn r21392) -Change: prepare the network protocol for getting the file size later in the download process

This commit is contained in:
rubidium
2010-12-05 14:34:19 +00:00
parent c8e8b0e0a0
commit 97434f0e06
5 changed files with 25 additions and 11 deletions

View File

@@ -73,6 +73,7 @@ enum PacketGameType {
PACKET_CLIENT_GETMAP, ///< Client requests the actual map.
PACKET_SERVER_WAIT, ///< Server tells the client there are some people waiting for the map as well.
PACKET_SERVER_MAP_BEGIN, ///< Server tells the client that it is beginning to send the map.
PACKET_SERVER_MAP_SIZE, ///< Server tells the client what the (compressed) size of the map is.
PACKET_SERVER_MAP_DATA, ///< Server sends bits of the map to the client.
PACKET_SERVER_MAP_DONE, ///< Server tells it has just sent the last bits of the map to the client.
PACKET_CLIENT_MAP_OK, ///< Client tells the server that it received the whole map.
@@ -272,10 +273,15 @@ protected:
/**
* Sends that the server will begin with sending the map to the client:
* uint32 Current frame.
* uint32 Size of the map (in bytes).
*/
DECLARE_GAME_RECEIVE_COMMAND(PACKET_SERVER_MAP_BEGIN);
/**
* Sends the size of the map to the client.
* uint32 Size of the (compressed) map (in bytes).
*/
DECLARE_GAME_RECEIVE_COMMAND(PACKET_SERVER_MAP_SIZE);
/**
* Sends the data of the map to the client:
* Contains a part of the map (until max size of packet).