Skip to content

Commit

Permalink
fix http_call request use const
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanshudong committed Aug 26, 2023
1 parent 7752131 commit e15acc4
Show file tree
Hide file tree
Showing 5 changed files with 292 additions and 292 deletions.
8 changes: 4 additions & 4 deletions servant/libservant/ServantProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ int ServantProxy::servant_invoke(ReqMessage *msg, bool bCoroAsync)
return 0;
}

void ServantProxy::http_call(const string &funcName, shared_ptr<TC_HttpRequest> &request, shared_ptr<TC_HttpResponse> &response)
void ServantProxy::http_call(const string &funcName, const shared_ptr<TC_HttpRequest> &request, shared_ptr<TC_HttpResponse> &response)
{
if (_connectionSerial <= 0)
{
Expand Down Expand Up @@ -1372,7 +1372,7 @@ void ServantProxy::http_call(const string &funcName, shared_ptr<TC_HttpRequest>
msg = NULL;
}

void ServantProxy::http_call_async(const string &funcName, shared_ptr<TC_HttpRequest> &request, const HttpCallbackPtr &cb, bool bCoro)
void ServantProxy::http_call_async(const string &funcName, const shared_ptr<TC_HttpRequest> &request, const HttpCallbackPtr &cb, bool bCoro)
{
if (_connectionSerial <= 0)
{
Expand Down Expand Up @@ -1413,7 +1413,7 @@ void ServantProxy::http_call_async(const string &funcName, shared_ptr<TC_HttpReq
servant_invoke(msg, bCoro);
}

void ServantProxy::common_protocol_call(const string &funcName, shared_ptr<TC_CustomProtoReq> &request, shared_ptr<TC_CustomProtoRsp> &response)
void ServantProxy::common_protocol_call(const string &funcName, const shared_ptr<TC_CustomProtoReq> &request, shared_ptr<TC_CustomProtoRsp> &response)
{
if (_connectionSerial <= 0)
{
Expand Down Expand Up @@ -1454,7 +1454,7 @@ void ServantProxy::common_protocol_call(const string &funcName, shared_ptr<TC_Cu
msg = NULL;
}

void ServantProxy::common_protocol_call_async(const string &funcName, shared_ptr<TC_CustomProtoReq> &request, const ServantProxyCallbackPtr &cb, bool bCoro)
void ServantProxy::common_protocol_call_async(const string &funcName, const shared_ptr<TC_CustomProtoReq> &request, const ServantProxyCallbackPtr &cb, bool bCoro)
{
if (_connectionSerial <= 0)
{
Expand Down
8 changes: 4 additions & 4 deletions servant/servant/ServantProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -1134,21 +1134,21 @@ class ServantProxy : public TC_HandleBase, public TC_ThreadMutex
* http协议同步远程调用
* @param funcName: 调用名称, 这里只是做统计用
*/
void http_call(const string &funcName, shared_ptr<TC_HttpRequest> &request, shared_ptr<TC_HttpResponse> &response);
void http_call(const string &funcName, const shared_ptr<TC_HttpRequest> &request, shared_ptr<TC_HttpResponse> &response);

/**
* http协议异步远程调用
* @param funcName: 调用名称, 这里只是做统计用
*/
void http_call_async(const string &funcName, shared_ptr<TC_HttpRequest> &request, const HttpCallbackPtr &cb, bool bCoro = false);
void http_call_async(const string &funcName, const shared_ptr<TC_HttpRequest> &request, const HttpCallbackPtr &cb, bool bCoro = false);

/**
* 通用协议同步调用(这种模式下, 一个连接上只能跑一个请求响应包, 和http模式keep-alive模式类似)
* @param funcName
* @param request
* @param response
*/
void common_protocol_call(const string &funcName, shared_ptr<TC_CustomProtoReq> &request, shared_ptr<TC_CustomProtoRsp> &response);
void common_protocol_call(const string &funcName, const shared_ptr<TC_CustomProtoReq> &request, shared_ptr<TC_CustomProtoRsp> &response);

/**
* 通用协议异步调用(这种模式下, 一个连接上只能跑一个请求响应包, 和http模式keep-alive模式类似)
Expand All @@ -1157,7 +1157,7 @@ class ServantProxy : public TC_HandleBase, public TC_ThreadMutex
* @param cb
* @param bCoro
*/
void common_protocol_call_async(const string &funcName, shared_ptr<TC_CustomProtoReq> &request, const ServantProxyCallbackPtr &cb, bool bCoro = false);
void common_protocol_call_async(const string &funcName, const shared_ptr<TC_CustomProtoReq> &request, const ServantProxyCallbackPtr &cb, bool bCoro = false);

/**
* TARS协议同步方法调用
Expand Down
Loading

0 comments on commit e15acc4

Please sign in to comment.