Add ccapi [header-only] lib to includes
This is the open source crypto connector lib
This commit is contained in:
1 parent
27310d2829
commit
99c440f568
102 files changed
+33735
No files matched your search
@@ -0,0 +1,23 @@
|
||||
#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_
|
||||
Reference in new issue
Block a user