Update ccapi to 7.9.3 (compatible w/ new boost)

This commit is contained in:
John Colvin committed 2026-03-19 15:17:38 +00:00
1 parent bd7ccb5f44
commit 9fa7a9898e
117 files changed
+9016 -11255

No files matched your search

@@ -4,14 +4,20 @@
#include "ccapi_cpp/ccapi_logger.h"
namespace beast = boost::beast;
namespace ccapi {
class HttpConnection CCAPI_FINAL {
class HttpConnection {
/**
* This class represents a TCP socket connection for the REST API.
*/
public:
HttpConnection(std::string host, std::string port, std::shared_ptr<beast::ssl_stream<beast::tcp_stream> > streamPtr)
HttpConnection(const HttpConnection&) = delete;
HttpConnection& operator=(const HttpConnection&) = delete;
HttpConnection(std::string host, std::string port, std::shared_ptr<beast::ssl_stream<beast::tcp_stream>> streamPtr)
: host(host), port(port), streamPtr(streamPtr) {}
std::string toString() const {
std::ostringstream oss;
oss << streamPtr;
@@ -19,10 +25,16 @@ class HttpConnection CCAPI_FINAL {
", lastReceiveDataTp = " + UtilTime::getISOTimestamp(lastReceiveDataTp) + "]";
return output;
}
void clearBuffer() { this->buffer.consume(this->buffer.size()); }
std::string host;
std::string port;
std::shared_ptr<beast::ssl_stream<beast::tcp_stream> > streamPtr;
std::shared_ptr<beast::ssl_stream<beast::tcp_stream>> streamPtr{nullptr};
TimePoint lastReceiveDataTp{std::chrono::seconds{0}};
boost::beast::flat_buffer buffer;
};
} /* namespace ccapi */
#endif // INCLUDE_CCAPI_CPP_CCAPI_HTTP_CONNECTION_H_