mirror of
https://gitee.com/TarsCloud/TarsCpp.git
synced 2025-01-05 17:42:24 +08:00
tars2cpp remote routerkey support
This commit is contained in:
parent
43350109f0
commit
889b3e4847
@ -1987,7 +1987,7 @@ string Tars2Cpp::generateHAsync(const OperationPtr& pPtr, const string& cn) cons
|
||||
}
|
||||
|
||||
s << TAB << "std::map<string, string> _mStatus;" << endl;
|
||||
|
||||
/*
|
||||
if (!routekey.empty())
|
||||
{
|
||||
ostringstream os;
|
||||
@ -1996,7 +1996,7 @@ string Tars2Cpp::generateHAsync(const OperationPtr& pPtr, const string& cn) cons
|
||||
|
||||
s << TAB << "_mStatus.insert(std::make_pair(ServantProxy::STATUS_GRID_KEY, " << os.str() << "));" << endl;
|
||||
}
|
||||
|
||||
*/
|
||||
s << TAB << "tars_invoke_async(tars::TARSNORMAL,\"" << pPtr->getId() << "\", _os, context, _mStatus, callback, true);" << endl;
|
||||
DEL_TAB;
|
||||
s << TAB << "}" << endl;
|
||||
@ -2058,6 +2058,7 @@ string Tars2Cpp::generateH(const OperationPtr& pPtr, bool bVirtual, const string
|
||||
|
||||
s << TAB << "std::map<string, string> _mStatus;" << endl;
|
||||
|
||||
/*
|
||||
if (!routekey.empty())
|
||||
{
|
||||
ostringstream os;
|
||||
@ -2066,6 +2067,7 @@ string Tars2Cpp::generateH(const OperationPtr& pPtr, bool bVirtual, const string
|
||||
|
||||
s << TAB << "_mStatus.insert(std::make_pair(ServantProxy::STATUS_GRID_KEY, " << os.str() << "));" << endl;
|
||||
}
|
||||
*/
|
||||
|
||||
// s << TAB << "tars_invoke(tars::TARSNORMAL,\"" << pPtr->getId() << "\", _os.getByteBuffer(), context, _mStatus, rep);" << endl;
|
||||
s << TAB << "shared_ptr<" + _namespace + "::ResponsePacket> rep = tars_invoke(tars::TARSNORMAL,\"" << pPtr->getId() << "\", _os, context, _mStatus);" << endl;
|
||||
|
Loading…
Reference in New Issue
Block a user