Preparing unsubscribing/resubscribing of the game list updates to (hopefully) limit server bandwidth usage.

This commit is contained in:
lotodore
2008-04-19 20:00:21 +00:00
parent 801846d1a9
commit 7d51a144dd
3 changed files with 180 additions and 0 deletions
+36
View File
@@ -61,6 +61,8 @@ class NetPacketGameListAdminChanged;
class NetPacketRetrievePlayerInfo;
class NetPacketPlayerInfo;
class NetPacketUnknownPlayerId;
class NetPacketUnsubscribeGameList;
class NetPacketResubscribeGameList;
class NetPacketCreateGame;
class NetPacketJoinGame;
class NetPacketJoinGameAck;
@@ -125,6 +127,8 @@ public:
virtual const NetPacketRetrievePlayerInfo *ToNetPacketRetrievePlayerInfo() const;
virtual const NetPacketPlayerInfo *ToNetPacketPlayerInfo() const;
virtual const NetPacketUnknownPlayerId *ToNetPacketUnknownPlayerId() const;
virtual const NetPacketUnsubscribeGameList *ToNetPacketUnsubscribeGameList() const;
virtual const NetPacketResubscribeGameList *ToNetPacketResubscribeGameList() const;
virtual const NetPacketCreateGame *ToNetPacketCreateGame() const;
virtual const NetPacketJoinGame *ToNetPacketJoinGame() const;
virtual const NetPacketJoinGameAck *ToNetPacketJoinGameAck() const;
@@ -541,6 +545,38 @@ protected:
virtual void InternalCheck(const NetPacketHeader* data) const;
};
class NetPacketUnsubscribeGameList : public NetPacket
{
public:
NetPacketUnsubscribeGameList();
virtual ~NetPacketUnsubscribeGameList();
virtual boost::shared_ptr<NetPacket> Clone() const;
virtual const NetPacketUnsubscribeGameList *ToNetPacketUnsubscribeGameList() const;
protected:
virtual void InternalCheck(const NetPacketHeader* data) const;
};
class NetPacketResubscribeGameList : public NetPacket
{
public:
NetPacketResubscribeGameList();
virtual ~NetPacketResubscribeGameList();
virtual boost::shared_ptr<NetPacket> Clone() const;
virtual const NetPacketResubscribeGameList *ToNetPacketResubscribeGameList() const;
protected:
virtual void InternalCheck(const NetPacketHeader* data) const;
};
class NetPacketCreateGame : public NetPacket
{
public: