(svn r21392) -Change: prepare the network protocol for getting the file size later in the download process
This commit is contained in:
@@ -89,6 +89,7 @@ NetworkRecvStatus NetworkGameSocketHandler::HandlePacket(Packet *p)
|
||||
GAME_COMMAND(PACKET_CLIENT_GETMAP)
|
||||
GAME_COMMAND(PACKET_SERVER_WAIT)
|
||||
GAME_COMMAND(PACKET_SERVER_MAP_BEGIN)
|
||||
GAME_COMMAND(PACKET_SERVER_MAP_SIZE)
|
||||
GAME_COMMAND(PACKET_SERVER_MAP_DATA)
|
||||
GAME_COMMAND(PACKET_SERVER_MAP_DONE)
|
||||
GAME_COMMAND(PACKET_CLIENT_MAP_OK)
|
||||
@@ -177,6 +178,7 @@ DEFINE_UNAVAILABLE_GAME_RECEIVE_COMMAND(PACKET_SERVER_WELCOME)
|
||||
DEFINE_UNAVAILABLE_GAME_RECEIVE_COMMAND(PACKET_CLIENT_GETMAP)
|
||||
DEFINE_UNAVAILABLE_GAME_RECEIVE_COMMAND(PACKET_SERVER_WAIT)
|
||||
DEFINE_UNAVAILABLE_GAME_RECEIVE_COMMAND(PACKET_SERVER_MAP_BEGIN)
|
||||
DEFINE_UNAVAILABLE_GAME_RECEIVE_COMMAND(PACKET_SERVER_MAP_SIZE)
|
||||
DEFINE_UNAVAILABLE_GAME_RECEIVE_COMMAND(PACKET_SERVER_MAP_DATA)
|
||||
DEFINE_UNAVAILABLE_GAME_RECEIVE_COMMAND(PACKET_SERVER_MAP_DONE)
|
||||
DEFINE_UNAVAILABLE_GAME_RECEIVE_COMMAND(PACKET_CLIENT_MAP_OK)
|
||||
|
@@ -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).
|
||||
|
Reference in New Issue
Block a user