1 #ifndef NOOS_CLOUD_ASIO_HTTPS 2 #define NOOS_CLOUD_ASIO_HTTPS 6 #include "includes.ihh" 7 #include <boost/asio.hpp> 8 #include <boost/asio/ssl.hpp> 9 #include <noos/cloud/asio/asio_handler.hpp> 36 std::function<
void(std::string)> cloud_callback,
37 std::function<
void(error_code error)> error_callback,
38 boost::asio::io_service & io_service,
39 const bool keep_alive,
40 boost::asio::streambuf & request
51 boost::asio::ip::tcp::resolver::query & query,
52 boost::asio::ip::tcp::resolver & resolver,
63 boost::asio::ip::tcp::resolver::query & query,
64 boost::asio::ip::tcp::resolver & resolver,
66 boost::asio::streambuf & request
70 void shutdown(
const boost::system::error_code);
82 bool verify_certificate(
bool preverified, boost::asio::ssl::verify_context& ctx);
85 void connect(
const boost::system::error_code err);
88 void handshake(
const boost::system::error_code err);
91 void time_check(
const boost::system::error_code & ec);
93 std::function<void(boost::system::error_code err)> error_;
94 std::function<void(std::string)> callback_;
95 boost::asio::ssl::context ctx_;
96 std::shared_ptr<tls_socket> socket_;
97 boost::asio::streambuf & request_;
98 std::shared_ptr<boost::asio::deadline_timer> deadline_;
99 std::atomic<bool> connected_ = {
false };
void send(boost::asio::ip::tcp::resolver::query &query, boost::asio::ip::tcp::resolver &resolver, unsigned int timeout, boost::asio::streambuf &request)
send data in an existing connection
ASIO socket controller of boost asio socket type T.
Definition: asio_handler.hpp:27
Definition: asio_handler.hpp:14
void shutdown(const boost::system::error_code)
shutdown handler
asio_https(std::function< void(std::string)> cloud_callback, std::function< void(error_code error)> error_callback, boost::asio::io_service &io_service, const bool keep_alive, boost::asio::streambuf &request)
constructor
bool is_connected() const
void stop_timeout()
stop timeout timer
void begin(boost::asio::ip::tcp::resolver::query &query, boost::asio::ip::tcp::resolver &resolver, unsigned int timeout)
begin connection
ASIO socket controller for TLS (encrypred) cloud service calls.
Definition: asio_https.hpp:23