summaryrefslogtreecommitdiff
path: root/src/network/core/tcp_game.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-12-05 14:34:19 +0000
committerrubidium <rubidium@openttd.org>2010-12-05 14:34:19 +0000
commit97434f0e06d2191b332a876e3171c5f3d1166d79 (patch)
tree8cbd35f8b6a5c9bb190d51b465dc22d9aa8dfd9c /src/network/core/tcp_game.h
parentc8e8b0e0a01e097320220ec05f2d0e27f82d3dc7 (diff)
downloadopenttd-97434f0e06d2191b332a876e3171c5f3d1166d79.tar.xz
(svn r21392) -Change: prepare the network protocol for getting the file size later in the download process
Diffstat (limited to 'src/network/core/tcp_game.h')
-rw-r--r--src/network/core/tcp_game.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/network/core/tcp_game.h b/src/network/core/tcp_game.h
index 24adf6acd..40ffdb1d4 100644
--- a/src/network/core/tcp_game.h
+++ b/src/network/core/tcp_game.h
@@ -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,11 +273,16 @@ 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).
*/