Add debug output
This commit is contained in:
parent
a6fe81a003
commit
c2c072b9ec
|
@ -12,6 +12,10 @@ HttpClientImpl::HttpClientImpl(trantor::EventLoop *loop,
|
|||
_useSSL(useSSL)
|
||||
{
|
||||
|
||||
}
|
||||
HttpClientImpl::~HttpClientImpl()
|
||||
{
|
||||
LOG_TRACE<<"Deconstruction HttpClient";
|
||||
}
|
||||
void HttpClientImpl::sendRequest(const drogon::HttpRequestPtr &req, const drogon::HttpReqCallback &callback)
|
||||
{
|
||||
|
|
|
@ -21,17 +21,18 @@
|
|||
namespace drogon{
|
||||
class HttpClientImpl:public HttpClient,public std::enable_shared_from_this<HttpClientImpl>
|
||||
{
|
||||
public:
|
||||
HttpClientImpl(trantor::EventLoop *loop,const trantor::InetAddress &addr,bool useSSL=false);
|
||||
virtual void sendRequest(const HttpRequestPtr &req,const HttpReqCallback &callback) override;
|
||||
private:
|
||||
std::shared_ptr<trantor::TcpClient> _tcpClient;
|
||||
trantor::EventLoop *_loop;
|
||||
trantor::InetAddress _server;
|
||||
bool _useSSL;
|
||||
void sendReq(const trantor::TcpConnectionPtr &connectorPtr,const HttpRequestPtr &req);
|
||||
void sendRequestInLoop(const HttpRequestPtr &req,const HttpReqCallback &callback);
|
||||
std::queue<std::pair<HttpRequestPtr,HttpReqCallback>> _reqAndCallbacks;
|
||||
void onRecvMessage(const trantor::TcpConnectionPtr&,trantor::MsgBuffer*);
|
||||
};
|
||||
public:
|
||||
HttpClientImpl(trantor::EventLoop *loop,const trantor::InetAddress &addr,bool useSSL=false);
|
||||
virtual void sendRequest(const HttpRequestPtr &req,const HttpReqCallback &callback) override;
|
||||
~HttpClientImpl();
|
||||
private:
|
||||
std::shared_ptr<trantor::TcpClient> _tcpClient;
|
||||
trantor::EventLoop *_loop;
|
||||
trantor::InetAddress _server;
|
||||
bool _useSSL;
|
||||
void sendReq(const trantor::TcpConnectionPtr &connectorPtr,const HttpRequestPtr &req);
|
||||
void sendRequestInLoop(const HttpRequestPtr &req,const HttpReqCallback &callback);
|
||||
std::queue<std::pair<HttpRequestPtr,HttpReqCallback>> _reqAndCallbacks;
|
||||
void onRecvMessage(const trantor::TcpConnectionPtr&,trantor::MsgBuffer*);
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue