1
This commit is contained in:
parent
64d4916dbe
commit
2f5c158c53
@ -20,14 +20,18 @@
|
|||||||
#include "handlermgr.h"
|
#include "handlermgr.h"
|
||||||
#include "downstream.h"
|
#include "downstream.h"
|
||||||
#include "downstreammgr.h"
|
#include "downstreammgr.h"
|
||||||
#include "ss_msgid.pb.h"
|
|
||||||
#include "ss_proto.pb.h"
|
|
||||||
|
|
||||||
#include "upstream.h"
|
#include "upstream.h"
|
||||||
#include "upstreammgr.h"
|
#include "upstreammgr.h"
|
||||||
#include "master.h"
|
#include "master.h"
|
||||||
#include "mastermgr.h"
|
#include "mastermgr.h"
|
||||||
|
|
||||||
|
#include "longsessionmgr.h"
|
||||||
|
|
||||||
|
#include "ss_msgid.pb.h"
|
||||||
|
#include "ss_proto.pb.h"
|
||||||
|
|
||||||
|
|
||||||
struct MsgNode
|
struct MsgNode
|
||||||
{
|
{
|
||||||
SocketFrom_e sockfrom;
|
SocketFrom_e sockfrom;
|
||||||
@ -120,6 +124,7 @@ bool App::Init(int argc, char* argv[])
|
|||||||
DownStreamMgr::Instance()->Init();
|
DownStreamMgr::Instance()->Init();
|
||||||
MasterMgr::Instance()->Init();
|
MasterMgr::Instance()->Init();
|
||||||
UpStreamMgr::Instance()->Init();
|
UpStreamMgr::Instance()->Init();
|
||||||
|
LongSessionMgr::Instance()->Init();
|
||||||
GCListener::Instance()->Init();
|
GCListener::Instance()->Init();
|
||||||
|
|
||||||
f8::UdpLog::Instance()->Info("wsproxy starting instance_id:%d pid:%d",
|
f8::UdpLog::Instance()->Info("wsproxy starting instance_id:%d pid:%d",
|
||||||
@ -174,6 +179,7 @@ void App::UnInit()
|
|||||||
{
|
{
|
||||||
a8::XPrintf("wsproxy terminating instance_id:%d pid:%d\n", {instance_id, getpid()});
|
a8::XPrintf("wsproxy terminating instance_id:%d pid:%d\n", {instance_id, getpid()});
|
||||||
GCListener::Instance()->UnInit();
|
GCListener::Instance()->UnInit();
|
||||||
|
LongSessionMgr::Instance()->UnInit();
|
||||||
MasterMgr::Instance()->UnInit();
|
MasterMgr::Instance()->UnInit();
|
||||||
UpStreamMgr::Instance()->UnInit();
|
UpStreamMgr::Instance()->UnInit();
|
||||||
DownStreamMgr::Instance()->UnInit();
|
DownStreamMgr::Instance()->UnInit();
|
||||||
|
@ -11,3 +11,8 @@ void LongSessionMgr::UnInit()
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<LongSession> GetSessionBySocketHandle(int socket_handle)
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <a8/singleton.h>
|
#include <a8/singleton.h>
|
||||||
|
|
||||||
|
class LongSession;
|
||||||
class LongSessionMgr : public a8::Singleton<LongSessionMgr>
|
class LongSessionMgr : public a8::Singleton<LongSessionMgr>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
@ -13,4 +14,9 @@ class LongSessionMgr : public a8::Singleton<LongSessionMgr>
|
|||||||
void Init();
|
void Init();
|
||||||
void UnInit();
|
void UnInit();
|
||||||
|
|
||||||
|
std::shared_ptr<LongSession> GetSessionBySocketHandle(int socket_handle);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
std::map<int, std::shared_ptr<LongSession>> session_hash_;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user