rippled
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Types | Protected Attributes | Private Member Functions | List of all members
ripple::detail::WorkBase< Impl > Class Template Reference

#include <WorkBase.h>

Inheritance diagram for ripple::detail::WorkBase< Impl >:
Inheritance graph
[legend]
Collaboration diagram for ripple::detail::WorkBase< Impl >:
Collaboration graph
[legend]

Public Types

using callback_type = std::function< void(error_code const &, endpoint_type const &, response_type &&)>
 

Public Member Functions

 WorkBase (std::string const &host, std::string const &path, std::string const &port, boost::asio::io_context &ios, endpoint_type const &lastEndpoint, bool lastStatus, callback_type cb)
 
 ~WorkBase ()
 
Impl & impl ()
 
void run () override
 
void cancel () override
 
void fail (error_code const &ec)
 
void onResolve (error_code const &ec, results_type results)
 
void onConnect (error_code const &ec, endpoint_type const &endpoint)
 
void onStart ()
 
void onRequest (error_code const &ec)
 
void onResponse (error_code const &ec)
 

Protected Types

using error_code = boost::system::error_code
 
using endpoint_type = boost::asio::ip::tcp::endpoint
 
using socket_type = boost::asio::ip::tcp::socket
 
using resolver_type = boost::asio::ip::tcp::resolver
 
using results_type = boost::asio::ip::tcp::resolver::results_type
 
using request_type = boost::beast::http::request< boost::beast::http::empty_body >
 

Protected Attributes

std::string host_
 
std::string path_
 
std::string port_
 
callback_type cb_
 
boost::asio::io_context & ios_
 
boost::asio::strand< boost::asio::io_context::executor_type > strand_
 
resolver_type resolver_
 
socket_type socket_
 
request_type req_
 
response_type res_
 
boost::beast::multi_buffer readBuf_
 
endpoint_type lastEndpoint_
 
bool lastStatus_
 

Private Member Functions

void close ()
 

Detailed Description

template<class Impl>
class ripple::detail::WorkBase< Impl >

Definition at line 21 of file WorkBase.h.

Member Typedef Documentation

◆ error_code

template<class Impl >
using ripple::detail::WorkBase< Impl >::error_code = boost::system::error_code
protected

Definition at line 24 of file WorkBase.h.

◆ endpoint_type

template<class Impl >
using ripple::detail::WorkBase< Impl >::endpoint_type = boost::asio::ip::tcp::endpoint
protected

Definition at line 25 of file WorkBase.h.

◆ callback_type

template<class Impl >
using ripple::detail::WorkBase< Impl >::callback_type = std::function< void(error_code const&, endpoint_type const&, response_type&&)>

Definition at line 28 of file WorkBase.h.

◆ socket_type

template<class Impl >
using ripple::detail::WorkBase< Impl >::socket_type = boost::asio::ip::tcp::socket
protected

Definition at line 32 of file WorkBase.h.

◆ resolver_type

template<class Impl >
using ripple::detail::WorkBase< Impl >::resolver_type = boost::asio::ip::tcp::resolver
protected

Definition at line 33 of file WorkBase.h.

◆ results_type

template<class Impl >
using ripple::detail::WorkBase< Impl >::results_type = boost::asio::ip::tcp::resolver::results_type
protected

Definition at line 34 of file WorkBase.h.

◆ request_type

template<class Impl >
using ripple::detail::WorkBase< Impl >::request_type = boost::beast::http::request<boost::beast::http::empty_body>
protected

Definition at line 35 of file WorkBase.h.

Constructor & Destructor Documentation

◆ WorkBase()

template<class Impl >
ripple::detail::WorkBase< Impl >::WorkBase ( std::string const &  host,
std::string const &  path,
std::string const &  port,
boost::asio::io_context &  ios,
endpoint_type const &  lastEndpoint,
bool  lastStatus,
callback_type  cb 
)

Definition at line 101 of file WorkBase.h.

◆ ~WorkBase()

template<class Impl >
ripple::detail::WorkBase< Impl >::~WorkBase ( )

Definition at line 123 of file WorkBase.h.

Member Function Documentation

◆ impl()

template<class Impl >
Impl & ripple::detail::WorkBase< Impl >::impl ( )

Definition at line 64 of file WorkBase.h.

◆ run()

template<class Impl >
void ripple::detail::WorkBase< Impl >::run ( )
overridevirtual

Implements ripple::detail::Work.

Definition at line 134 of file WorkBase.h.

◆ cancel()

template<class Impl >
void ripple::detail::WorkBase< Impl >::cancel ( )
overridevirtual

Implements ripple::detail::Work.

Definition at line 156 of file WorkBase.h.

◆ fail()

template<class Impl >
void ripple::detail::WorkBase< Impl >::fail ( error_code const &  ec)

Definition at line 175 of file WorkBase.h.

◆ onResolve()

template<class Impl >
void ripple::detail::WorkBase< Impl >::onResolve ( error_code const &  ec,
results_type  results 
)

Definition at line 186 of file WorkBase.h.

◆ onConnect()

template<class Impl >
void ripple::detail::WorkBase< Impl >::onConnect ( error_code const &  ec,
endpoint_type const &  endpoint 
)

Definition at line 205 of file WorkBase.h.

◆ onStart()

template<class Impl >
void ripple::detail::WorkBase< Impl >::onStart ( )

Definition at line 217 of file WorkBase.h.

◆ onRequest()

template<class Impl >
void ripple::detail::WorkBase< Impl >::onRequest ( error_code const &  ec)

Definition at line 238 of file WorkBase.h.

◆ onResponse()

template<class Impl >
void ripple::detail::WorkBase< Impl >::onResponse ( error_code const &  ec)

Definition at line 257 of file WorkBase.h.

◆ close()

template<class Impl >
void ripple::detail::WorkBase< Impl >::close ( )
private

Definition at line 270 of file WorkBase.h.

Member Data Documentation

◆ host_

template<class Impl >
std::string ripple::detail::WorkBase< Impl >::host_
protected

Definition at line 38 of file WorkBase.h.

◆ path_

template<class Impl >
std::string ripple::detail::WorkBase< Impl >::path_
protected

Definition at line 39 of file WorkBase.h.

◆ port_

template<class Impl >
std::string ripple::detail::WorkBase< Impl >::port_
protected

Definition at line 40 of file WorkBase.h.

◆ cb_

template<class Impl >
callback_type ripple::detail::WorkBase< Impl >::cb_
protected

Definition at line 41 of file WorkBase.h.

◆ ios_

template<class Impl >
boost::asio::io_context& ripple::detail::WorkBase< Impl >::ios_
protected

Definition at line 42 of file WorkBase.h.

◆ strand_

template<class Impl >
boost::asio::strand<boost::asio::io_context::executor_type> ripple::detail::WorkBase< Impl >::strand_
protected

Definition at line 43 of file WorkBase.h.

◆ resolver_

template<class Impl >
resolver_type ripple::detail::WorkBase< Impl >::resolver_
protected

Definition at line 44 of file WorkBase.h.

◆ socket_

template<class Impl >
socket_type ripple::detail::WorkBase< Impl >::socket_
protected

Definition at line 45 of file WorkBase.h.

◆ req_

template<class Impl >
request_type ripple::detail::WorkBase< Impl >::req_
protected

Definition at line 46 of file WorkBase.h.

◆ res_

template<class Impl >
response_type ripple::detail::WorkBase< Impl >::res_
protected

Definition at line 47 of file WorkBase.h.

◆ readBuf_

template<class Impl >
boost::beast::multi_buffer ripple::detail::WorkBase< Impl >::readBuf_
protected

Definition at line 48 of file WorkBase.h.

◆ lastEndpoint_

template<class Impl >
endpoint_type ripple::detail::WorkBase< Impl >::lastEndpoint_
protected

Definition at line 49 of file WorkBase.h.

◆ lastStatus_

template<class Impl >
bool ripple::detail::WorkBase< Impl >::lastStatus_
protected

Definition at line 50 of file WorkBase.h.