Files
externals/linux/include/ccapi_cpp/ccapi_http_connection.h
T
John Colvin 99c440f568 Add ccapi [header-only] lib to includes
This is the open source crypto connector lib
2022-06-06 11:57:00 -04:00

24 lines
838 B
C++

#ifndef INCLUDE_CCAPI_CPP_CCAPI_HTTP_CONNECTION_H_
#define INCLUDE_CCAPI_CPP_CCAPI_HTTP_CONNECTION_H_
#include <string>
#include "ccapi_cpp/ccapi_logger.h"
namespace beast = boost::beast;
namespace ccapi {
class HttpConnection CCAPI_FINAL {
public:
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;
std::string output = "HttpConnection [host = " + host + ", port = " + port + ", streamPtr = " + oss.str() + "]";
return output;
}
std::string host;
std::string port;
std::shared_ptr<beast::ssl_stream<beast::tcp_stream> > streamPtr;
};
} /* namespace ccapi */
#endif // INCLUDE_CCAPI_CPP_CCAPI_HTTP_CONNECTION_H_