Template Struct https_client_connection

Inheritance Relationships

Base Types

  • public std::enable_shared_from_this< https_client_connection< ContextT > >

  • public udho::detail::async_result< ContextT > (Template Struct async_result)

Struct Documentation

template<typename ContextT>
struct udho::detail::https_client_connection : public std::enable_shared_from_this<https_client_connection<ContextT>>, public udho::detail::async_result<ContextT>

Todo:

write docs

Public Types

typedef std::enable_shared_from_this<https_client_connection<ContextT>> base
typedef async_result<ContextT> result_type
typedef https_client_connection<ContextT> self_type
typedef ContextT context_type
typedef udho::config<udho::client_options> options_type
typedef boost::function<void(const std::string&)> redirector_type

Public Functions

https_client_connection(ContextT context, const udho::url &u, boost::asio::executor ex, boost::asio::ssl::context &ssl_ctx, options_type options)
void start(boost::beast::http::verb method = boost::beast::http::verb::get)
void on_resolve(boost::beast::error_code ec, boost::asio::ip::tcp::resolver::results_type results)
void on_connect(boost::beast::error_code ec)
void on_handshake(boost::beast::error_code ec)
void on_write(boost::beast::error_code ec, std::size_t)
void on_read(boost::beast::error_code ec, std::size_t)
void on_shutdown(boost::beast::error_code ec)
result_type &result()

Public Members

udho::url _url
boost::asio::ip::tcp::resolver resolver
boost::asio::ssl::context &_ssl_ctx
boost::asio::ssl::stream<boost::asio::ip::tcp::socket> stream
boost::beast::flat_buffer buffer
boost::beast::http::request<boost::beast::http::empty_body> req
boost::beast::http::response<boost::beast::http::string_body> res

Public Static Functions

std::shared_ptr<self_type> create(boost::asio::io_service &io, ContextT ctx, udho::url url, options_type options)