Further simplifying sending network data. This improves performance, because sending sessions no longer need to be looked up in a map.

This commit is contained in:
lotodore
2011-02-19 13:56:49 +00:00
parent a69c248d1c
commit 8279868417
5 changed files with 27 additions and 57 deletions
+10 -1
View File
@@ -38,6 +38,7 @@ typedef unsigned SessionId;
struct Gsasl;
struct Gsasl_session;
class SendDataManager;
class SessionData
{
@@ -76,7 +77,12 @@ public:
const std::string &GetClientAddr() const;
void SetClientAddr(const std::string &addr);
ReceiveBuffer &GetReceiveBuffer();
ReceiveBuffer &GetReceiveBuffer() {
return m_receiveBuffer;
}
SendDataManager &GetSendDataManager() {
return *m_sendDataManager;
}
void ResetActivityTimer();
unsigned GetActivityTimerElapsedSec() const;
@@ -85,6 +91,8 @@ public:
unsigned GetAutoDisconnectTimerElapsedSec() const;
protected:
SessionData(const SessionData &other);
SessionData &operator=(const SessionData &other);
void InternalClearAuthSession();
private:
@@ -94,6 +102,7 @@ private:
State m_state;
std::string m_clientAddr;
ReceiveBuffer m_receiveBuffer;
boost::shared_ptr<SendDataManager> m_sendDataManager;
bool m_readyFlag;
bool m_wantsLobbyMsg;
boost::timers::portable::microsec_timer m_activityTimer;