1
This commit is contained in:
parent
90b90c1d44
commit
d3ef1e5b83
@ -5,6 +5,7 @@
|
|||||||
#include <a8/tcplistener.h>
|
#include <a8/tcplistener.h>
|
||||||
|
|
||||||
#include <f8/netmsghandler.h>
|
#include <f8/netmsghandler.h>
|
||||||
|
#include <f8/msgqueue.h>
|
||||||
|
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
#include "GGListener.h"
|
#include "GGListener.h"
|
||||||
@ -50,25 +51,29 @@ public:
|
|||||||
virtual void OnRawHttpGet(const std::string& url, const std::string& querystr,
|
virtual void OnRawHttpGet(const std::string& url, const std::string& querystr,
|
||||||
std::string& response) override
|
std::string& response) override
|
||||||
{
|
{
|
||||||
#if 0
|
f8::MsgQueue::Instance()->PostMsg
|
||||||
App::Instance()->AddIMMsg(IM_ExecGM,
|
(IM_ExecGM,
|
||||||
a8::XParams()
|
a8::Args
|
||||||
.SetSender(socket_handle)
|
(
|
||||||
.SetParam1(url)
|
{
|
||||||
.SetParam2(querystr)
|
socket_handle,
|
||||||
.SetParam3(saddr)
|
a8::XValue(url).GetString(),
|
||||||
);
|
a8::XValue(querystr).GetString(),
|
||||||
#endif
|
saddr
|
||||||
|
}
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnDisConnect() override
|
virtual void OnDisConnect() override
|
||||||
{
|
{
|
||||||
#if 0
|
f8::MsgQueue::Instance()->PostMsg
|
||||||
App::Instance()->AddIMMsg(IM_ClientSocketDisconnect,
|
(IM_ClientSocketDisconnect,
|
||||||
a8::XParams()
|
a8::Args
|
||||||
.SetSender(socket_handle)
|
(
|
||||||
.SetParam1(1));
|
{
|
||||||
#endif
|
socket_handle
|
||||||
|
}
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <a8/mutable_xobject.h>
|
#include <a8/mutable_xobject.h>
|
||||||
#include <f8/jsonhttprequest.h>
|
#include <f8/jsonhttprequest.h>
|
||||||
|
#include <f8/msgqueue.h>
|
||||||
|
|
||||||
#include "handlermgr.h"
|
#include "handlermgr.h"
|
||||||
|
|
||||||
@ -34,6 +35,24 @@ void HandlerMgr::Init()
|
|||||||
{
|
{
|
||||||
GSMgr::Instance()->___GSList(request);
|
GSMgr::Instance()->___GSList(request);
|
||||||
});
|
});
|
||||||
|
f8::MsgQueue::Instance()->RegisterCallBack
|
||||||
|
(
|
||||||
|
IM_ExecGM,
|
||||||
|
[] (const a8::Args& args)
|
||||||
|
{
|
||||||
|
int socket_handle = args.Get<int>(0);
|
||||||
|
std::string url = args.Get<std::string>(1);
|
||||||
|
std::string query_str = args.Get<std::string>(2);
|
||||||
|
unsigned long saddr = args.Get<unsigned long>(3);
|
||||||
|
|
||||||
|
HandlerMgr::Instance()->ProcGMMsg
|
||||||
|
(
|
||||||
|
saddr,
|
||||||
|
socket_handle,
|
||||||
|
url,
|
||||||
|
query_str
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandlerMgr::UnInit()
|
void HandlerMgr::UnInit()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user