(svn r21399) -Change/Feature/Fix [FS#4284]: perform the compression of savegames to send to the client asynchroniously. This will reduce the lag of the other clients to the time it takes to make the memory dump and it will speed up downloading the map as the download starts earlier (possibly with a slightly lower bandwidth due to slow compression). This should also fix the lag message people get when the savegame compression takes more than a few seconds.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "network_internal.h"
|
||||
#include "core/tcp_listen.h"
|
||||
#include "../thread/thread.h"
|
||||
|
||||
class ServerNetworkGameSocketHandler;
|
||||
typedef ServerNetworkGameSocketHandler NetworkClientSocket;
|
||||
@@ -74,11 +75,13 @@ public:
|
||||
|
||||
Packet *savegame_packets; ///< Packet queue of the savegame; send these "slowly" to the client.
|
||||
struct PacketWriter *savegame; ///< Writer used to write the savegame.
|
||||
ThreadMutex *savegame_mutex; ///< Mutex for making threaded saving safe.
|
||||
|
||||
ServerNetworkGameSocketHandler(SOCKET s);
|
||||
~ServerNetworkGameSocketHandler();
|
||||
|
||||
virtual Packet *ReceivePacket();
|
||||
virtual void SendPacket(Packet *packet);
|
||||
NetworkRecvStatus CloseConnection(NetworkRecvStatus status);
|
||||
void GetClientName(char *client_name, size_t size) const;
|
||||
|
||||
|
Reference in New Issue
Block a user