remove not use code

This commit is contained in:
jarodruan 2020-02-10 14:40:55 +08:00
parent a17cef6a01
commit 9a9fda7b6e
2 changed files with 0 additions and 82 deletions

View File

@ -183,28 +183,6 @@ int ServantProxyCallback::onDispatchException(const RequestPacket &req, const Re
return 0;
}
// PushServantProxyCallback::PushServantProxyCallback(PushCallback* cb) :
// _pushCb(cb)
// {
// assert(_pushCb);
// }
// int PushServantProxyCallback::onDispatchResponse(const RequestPacket &request, const ResponsePacket &response)
// {
// if(response.iRequestId != 0)
// {
// if (response.iRet != tars::TARSSERVERSUCCESS)
// {
// return _pushCb->onRequestException(response.iRet);
// }
// return _pushCb->onRequestResponse(request, response);
// }
// else
// {
// return _pushCb->onPushResponse(response);
// }
// }
HttpServantProxyCallback::HttpServantProxyCallback(const HttpCallbackPtr& cb) :
_httpCb(cb)
{
@ -220,20 +198,6 @@ int HttpServantProxyCallback::onDispatchResponse(const RequestPacket &request, c
return _httpCb->onHttpResponse(request.context, response.status, response.sBuffer);
}
// int HttpServantProxyCallback::onDispatch(ReqMessagePtr msg)
// {
// if (!_httpCb)
// return 0;
// if (msg->response->iRet != tars::TARSSERVERSUCCESS)
// _httpCb->onHttpResponseException(msg->request.context, msg->response->iRet);
// else
// return _httpCb->onHttpResponse(msg->request.context, msg->response->status, msg->response->sBuffer);
// return 0;
// }
///////////////////////////////////////////////////////////////
void coroWhenAll(const CoroParallelBasePtr &ptr)
{
@ -468,16 +432,6 @@ void ServantProxy::tars_ping()
tars::TarsOutputStream<tars::BufferWriterVector> os;
tars_invoke(tars::TARSNORMAL, "tars_ping", os, m, s);
// vector<char> v;
// map<string, string> m;
// map<string, string> s;
// ResponsePacket rsp;
// tars_invoke(tars::TARSNORMAL, "tars_ping", v, m, s, rsp);
}

View File

@ -332,42 +332,6 @@ protected:
*/
tars::CoroParallelBasePtr _pPtr;
};
///////////////////////////////////////////////////////////////////////////////////////////////
// class PushCallback : public TC_HandleBase
// {
// public:
// virtual int onRequestException(int iRet) = 0;
// virtual int onRequestResponse(const RequestPacket& request, const ResponsePacket& response) = 0;
// virtual int onPushResponse(const ResponsePacket& response) = 0;
// };
// typedef TC_AutoPtr<PushCallback> PushCallbackPtr;
// class PushServantProxyCallback : virtual public ServantProxyCallback
// {
// public:
// explicit PushServantProxyCallback(PushCallback* cb);
// /**
// * 异步回调对象实现该方法,进行业务逻辑处理
// * @param msg
// * @return void
// */
// virtual int onDispatchResponse(const RequestPacket &request, const ResponsePacket &response);
// /**
// * 异步回调对象实现该方法(异常),进行业务逻辑处理
// * @param msg
// * @return void
// */
// virtual int onDispatchException(const RequestPacket &request, const ResponsePacket &response){return 0;}
// private:
// TC_AutoPtr<PushCallback> _pushCb;
// };
///////////////////////////////////////////////////////////////////////////////////////////////
// for http
class HttpCallback : public TC_HandleBase