Fixed multithreading issues when creating/joining a game. Sessions are now queued.

This commit is contained in:
lotodore
2007-08-20 22:55:39 +00:00
parent 23963e4ac5
commit 95e5ee47cc
8 changed files with 130 additions and 219 deletions
+2 -25
View File
@@ -45,7 +45,6 @@ class NetPacketInitAck;
class NetPacketGameListNew;
class NetPacketGameListUpdate;
class NetPacketCreateGame;
class NetPacketCreateGameAck;
class NetPacketJoinGame;
class NetPacketJoinGameAck;
class NetPacketPlayerJoined;
@@ -91,7 +90,6 @@ public:
virtual const NetPacketGameListNew *ToNetPacketGameListNew() const;
virtual const NetPacketGameListUpdate *ToNetPacketGameListUpdate() const;
virtual const NetPacketCreateGame *ToNetPacketCreateGame() const;
virtual const NetPacketCreateGameAck *ToNetPacketCreateGameAck() const;
virtual const NetPacketJoinGame *ToNetPacketJoinGame() const;
virtual const NetPacketJoinGameAck *ToNetPacketJoinGameAck() const;
virtual const NetPacketPlayerJoined *ToNetPacketPlayerJoined() const;
@@ -253,29 +251,6 @@ protected:
virtual void InternalCheck(const NetPacketHeader* data) const;
};
class NetPacketCreateGameAck : public NetPacket
{
public:
struct Data
{
u_int32_t gameId;
};
NetPacketCreateGameAck();
virtual ~NetPacketCreateGameAck();
virtual boost::shared_ptr<NetPacket> Clone() const;
void SetData(const Data &inData);
void GetData(Data &outData) const;
virtual const NetPacketCreateGameAck *ToNetPacketCreateGameAck() const;
protected:
virtual void InternalCheck(const NetPacketHeader* data) const;
};
class NetPacketJoinGame : public NetPacket
{
public:
@@ -305,7 +280,9 @@ class NetPacketJoinGameAck : public NetPacket
public:
struct Data
{
u_int32_t gameId;
GameData gameData;
PlayerRights prights;
};
NetPacketJoinGameAck();