Use several sender threads with load balancing for sending the avatars. Remember last failed send operation (not yet a list, just the last) and cancel any more low prio sends to that sender.

This commit is contained in:
lotodore
2007-11-14 22:11:04 +00:00
parent 5328bf082f
commit 82a1be763b
4 changed files with 57 additions and 24 deletions
+3
View File
@@ -84,6 +84,7 @@ protected:
typedef std::map<SessionId, boost::timers::portable::microsec_timer> InitTimerSessionMap;
typedef std::map<unsigned, boost::shared_ptr<ServerGameThread> > GameMap;
typedef std::list<unsigned> RemoveGameList;
typedef std::list<boost::shared_ptr<SenderThread> > SenderThreadList;
// Main function of the thread.
virtual void Main();
@@ -166,6 +167,7 @@ private:
boost::shared_ptr<ReceiverHelper> m_receiver;
boost::shared_ptr<SenderThread> m_sender;
SenderThreadList m_avatarSenderThreadPool;
boost::shared_ptr<ServerSenderCallback> m_senderCallback;
GuiInterface &m_gui;
AvatarManager &m_avatarManager;
@@ -186,6 +188,7 @@ private:
boost::timers::portable::microsec_timer m_cacheCleanupTimer;
boost::timers::portable::microsec_timer m_saveStatisticsTimer;
boost::timers::portable::microsec_timer m_uptimeTimer;
};
#endif