Loading examples/httpclient.cpp +1 −1 Changes for examples/httpclient.cpp: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ int main(int argc, char** argv){ #ifndef Windows signal(SIGPIPE, SIG_IGN); #endif std::shared_ptr<netplus::socket> cltsock=std::make_shared<netplus::tcp>(argv[1], atoi(argv[2]), 1, 0); std::unique_ptr<netplus::socket> cltsock=std::make_unique<netplus::tcp>(argv[1], atoi(argv[2]), 1, 0); netplus::tcp srvsock; netplus::buffer data(16384); try{ Loading src/http.cpp +2 −2 Changes for src/http.cpp: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -181,8 +181,8 @@ libhttppp::HttpClient::HttpClient(const HttpUrl &desturl) : _url(desturl){ if(_url.getProtocol()!=HttpUrl::HTTP){ throw HTTPException()[HTTPException::Error]<<"only http protocol supported !"; } _srvsock = std::make_shared<netplus::tcp>(_url.getHost().c_str(), _url.getPort(),1,0); _cltsock = std::make_shared<netplus::tcp>(); _srvsock = std::make_unique<netplus::tcp>(_url.getHost().c_str(), _url.getPort(),1,0); _cltsock = std::make_unique<netplus::tcp>(); _cltsock->connect(_srvsock); _cltsock->setTimeout(1); } Loading src/http.h +2 −2 Changes for src/http.h: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -87,8 +87,8 @@ namespace libhttppp { int readchunk(const char *data,int datasize,int &pos); private: HttpUrl _url; std::shared_ptr<netplus::socket> _srvsock; std::shared_ptr<netplus::socket> _cltsock; std::unique_ptr<netplus::socket> _srvsock; std::unique_ptr<netplus::socket> _cltsock; std::vector<char> _ret; }; Loading Loading
examples/httpclient.cpp +1 −1 Changes for examples/httpclient.cpp: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ int main(int argc, char** argv){ #ifndef Windows signal(SIGPIPE, SIG_IGN); #endif std::shared_ptr<netplus::socket> cltsock=std::make_shared<netplus::tcp>(argv[1], atoi(argv[2]), 1, 0); std::unique_ptr<netplus::socket> cltsock=std::make_unique<netplus::tcp>(argv[1], atoi(argv[2]), 1, 0); netplus::tcp srvsock; netplus::buffer data(16384); try{ Loading
src/http.cpp +2 −2 Changes for src/http.cpp: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -181,8 +181,8 @@ libhttppp::HttpClient::HttpClient(const HttpUrl &desturl) : _url(desturl){ if(_url.getProtocol()!=HttpUrl::HTTP){ throw HTTPException()[HTTPException::Error]<<"only http protocol supported !"; } _srvsock = std::make_shared<netplus::tcp>(_url.getHost().c_str(), _url.getPort(),1,0); _cltsock = std::make_shared<netplus::tcp>(); _srvsock = std::make_unique<netplus::tcp>(_url.getHost().c_str(), _url.getPort(),1,0); _cltsock = std::make_unique<netplus::tcp>(); _cltsock->connect(_srvsock); _cltsock->setTimeout(1); } Loading
src/http.h +2 −2 Changes for src/http.h: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -87,8 +87,8 @@ namespace libhttppp { int readchunk(const char *data,int datasize,int &pos); private: HttpUrl _url; std::shared_ptr<netplus::socket> _srvsock; std::shared_ptr<netplus::socket> _cltsock; std::unique_ptr<netplus::socket> _srvsock; std::unique_ptr<netplus::socket> _cltsock; std::vector<char> _ret; }; Loading