mirror of
https://gitee.com/TarsCloud/TarsCpp.git
synced 2024-12-22 22:16:38 +08:00
rollback
This commit is contained in:
parent
a557ee18b3
commit
cc2ba158b9
@ -18,7 +18,6 @@
|
||||
#include "servant/Communicator.h"
|
||||
#include "Hello.h"
|
||||
#include "util/tc_option.h"
|
||||
#include "servant/TarsCookie.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace tars;
|
||||
@ -56,9 +55,6 @@ struct HelloCallback : public HelloPrxCallback
|
||||
assert(ret == 0);
|
||||
callback_count++;
|
||||
|
||||
map<string, string> & cookie = TarsCookieOp::getCookie();
|
||||
TLOGDEBUG("cookie:" << TC_Common::tostr(cookie.begin(), cookie.end()) << endl);
|
||||
|
||||
if(cur == count-1)
|
||||
{
|
||||
int64_t cost = TC_Common::now2us() - start;
|
||||
@ -82,11 +78,6 @@ void syncCall(int c)
|
||||
string buffer(param.buffersize, 'a');
|
||||
|
||||
int64_t t = TC_Common::now2us();
|
||||
|
||||
TarsCookieOp cookieOp;
|
||||
map<string, string> cookie = {{"msgno", "12345"}, {"uid", "67890"}};
|
||||
cookieOp.setCookie(cookie);
|
||||
|
||||
//发起远程调用
|
||||
for (int i = 0; i < c; ++i)
|
||||
{
|
||||
@ -115,10 +106,6 @@ void asyncCall(int c)
|
||||
|
||||
string buffer(param.buffersize, 'a');
|
||||
|
||||
TarsCookieOp cookieOp;
|
||||
map<string, string> cookie = {{"msgno", "12345"}, {"uid", "67890"}};
|
||||
cookieOp.setCookie(cookie);
|
||||
|
||||
//发起远程调用
|
||||
for (int i = 0; i < c; ++i)
|
||||
{
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#include "HelloImp.h"
|
||||
#include "servant/Application.h"
|
||||
#include "servant/TarsCookie.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -37,20 +36,7 @@ void HelloImp::destroy()
|
||||
int HelloImp::testHello(const std::string &sReq, std::string &sRsp, tars::TarsCurrentPtr current)
|
||||
{
|
||||
TLOGDEBUG("HelloImp::testHellosReq:"<<sReq<<endl);
|
||||
|
||||
map<string, string> & cookie = TarsCookieOp::getCookie();
|
||||
TLOGDEBUG("cookie:" << TC_Common::tostr(cookie.begin(), cookie.end()) << endl);
|
||||
|
||||
TLOGDEBUG("msgno:" << cookie["msgno"] << endl);
|
||||
TLOGDEBUG("uid:" << cookie["uid"] << endl);
|
||||
|
||||
{
|
||||
map<string, string> & cookie = current->getCookie();
|
||||
TLOGDEBUG("current cookie:" << TC_Common::tostr(cookie.begin(), cookie.end()) << endl);
|
||||
}
|
||||
|
||||
sRsp = sReq;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user