23 lines
408 B
C++
23 lines
408 B
C++
#pragma once
|
|
|
|
#include <a8/singleton.h>
|
|
|
|
class LongSession;
|
|
class LongSessionMgr : public a8::Singleton<LongSessionMgr>
|
|
{
|
|
private:
|
|
LongSessionMgr() {};
|
|
friend class a8::Singleton<LongSessionMgr>;
|
|
|
|
public:
|
|
|
|
void Init();
|
|
void UnInit();
|
|
|
|
std::shared_ptr<LongSession> GetSessionBySocketHandle(int socket_handle);
|
|
|
|
private:
|
|
|
|
std::map<int, std::shared_ptr<LongSession>> session_hash_;
|
|
};
|