New boost::asio based sender thread. Does not work on windows yet, because the completion routine is never called. No idea why not.

This commit is contained in:
lotodore
2009-01-25 20:19:09 +00:00
parent cb3f0856c1
commit 17377f5a6b
5 changed files with 116 additions and 157 deletions
+1 -8
View File
@@ -77,7 +77,6 @@ public:
void RemoveComputerPlayer(boost::shared_ptr<PlayerData> player);
void RemoveGame(unsigned id);
void RemoveSender(unsigned session);
u_int32_t GetNextUniquePlayerId();
u_int32_t GetNextGameId();
@@ -98,8 +97,6 @@ protected:
typedef std::map<unsigned, boost::shared_ptr<ServerGameThread> > GameMap;
typedef std::map<std::string, boost::timers::portable::microsec_timer> TimerClientAddressMap;
typedef std::list<unsigned> RemoveGameList;
typedef std::list<unsigned> RemoveSenderList;
typedef std::map<unsigned, boost::shared_ptr<SenderInterface> >SenderMap;
// Main function of the thread.
virtual void Main();
@@ -120,7 +117,6 @@ protected:
void NewSessionLoop();
void RemoveGameLoop();
void RemovePlayerLoop();
void RemoveSenderLoop();
void ResubscribeLobbyMsgLoop();
void CheckSessionTimeoutsLoop();
void UpdateAvatarClientTimerLoop();
@@ -183,9 +179,6 @@ private:
RemovePlayerList m_removePlayerList;
mutable boost::mutex m_removePlayerListMutex;
RemoveSenderList m_removeSenderList;
mutable boost::mutex m_removeSenderListMutex;
PlayerDataMap m_computerPlayers;
mutable boost::mutex m_computerPlayersMutex;
@@ -193,8 +186,8 @@ private:
mutable boost::mutex m_resubscribeListMutex;
GameMap m_gameMap;
SenderMap m_senderMap;
boost::shared_ptr<SenderInterface> m_sender;
boost::shared_ptr<ReceiverHelper> m_receiver;
boost::shared_ptr<ServerSenderCallback> m_senderCallback;
GuiInterface &m_gui;