Loading src/http.cpp +321 −1091 File changed.Preview size limit exceeded, changes collapsed. Show changes src/http.h +10 −0 Original line number Diff line number Diff line Loading @@ -93,9 +93,18 @@ namespace libhttppp { const std::vector<char> Delete(HttpRequest &nreq); private: void resetConnection(); void _ensureConnected(); bool tryHttp3First(); int readchunk(const char *data,int datasize,int &pos); // Non-blocking I/O helpers using poll() for efficient waiting size_t _recvBlocking(netplus::buffer &b); void _sendAll(const char *data, size_t len); void _sendAll(const std::string &data); // Shared HTTP/1.x response reader (avoids code duplication) std::vector<char> _h1ReadResponse(const std::string &label); // HTTP/2 client helpers bool _isH2 = false; const std::vector<char> _h2Request(const std::string &method, Loading @@ -107,6 +116,7 @@ namespace libhttppp { private: HttpUrl _url; std::unique_ptr<netplus::socket> _cltsock; netplus::socketwait _sw; netplus::x509cert _cert; }; Loading Loading
src/http.h +10 −0 Original line number Diff line number Diff line Loading @@ -93,9 +93,18 @@ namespace libhttppp { const std::vector<char> Delete(HttpRequest &nreq); private: void resetConnection(); void _ensureConnected(); bool tryHttp3First(); int readchunk(const char *data,int datasize,int &pos); // Non-blocking I/O helpers using poll() for efficient waiting size_t _recvBlocking(netplus::buffer &b); void _sendAll(const char *data, size_t len); void _sendAll(const std::string &data); // Shared HTTP/1.x response reader (avoids code duplication) std::vector<char> _h1ReadResponse(const std::string &label); // HTTP/2 client helpers bool _isH2 = false; const std::vector<char> _h2Request(const std::string &method, Loading @@ -107,6 +116,7 @@ namespace libhttppp { private: HttpUrl _url; std::unique_ptr<netplus::socket> _cltsock; netplus::socketwait _sw; netplus::x509cert _cert; }; Loading