rippled
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Types | Protected Attributes | Private Member Functions | Friends | List of all members
ripple::detail::WorkPlain Class Reference

#include <WorkPlain.h>

Inheritance diagram for ripple::detail::WorkPlain:
Inheritance graph
[legend]
Collaboration diagram for ripple::detail::WorkPlain:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

 WorkPlain (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)
 
 ~WorkPlain ()=default
 
WorkPlainimpl ()
 
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)
 
shared_from_this (T... args)
 
weak_from_this (T... args)
 

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 onConnect (error_code const &ec)
 
socket_typestream ()
 
void close ()
 

Friends

class WorkBase< WorkPlain >
 

Detailed Description

Definition at line 11 of file WorkPlain.h.

Member Typedef Documentation

◆ error_code

using ripple::detail::WorkBase< WorkPlain >::error_code = boost::system::error_code
protectedinherited

Definition at line 24 of file WorkBase.h.

◆ endpoint_type

using ripple::detail::WorkBase< WorkPlain >::endpoint_type = boost::asio::ip::tcp::endpoint
protectedinherited

Definition at line 25 of file WorkBase.h.

◆ callback_type

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

Definition at line 28 of file WorkBase.h.

◆ socket_type

using ripple::detail::WorkBase< WorkPlain >::socket_type = boost::asio::ip::tcp::socket
protectedinherited

Definition at line 32 of file WorkBase.h.

◆ resolver_type

using ripple::detail::WorkBase< WorkPlain >::resolver_type = boost::asio::ip::tcp::resolver
protectedinherited

Definition at line 33 of file WorkBase.h.

◆ results_type

using ripple::detail::WorkBase< WorkPlain >::results_type = boost::asio::ip::tcp::resolver::results_type
protectedinherited

Definition at line 34 of file WorkBase.h.

◆ request_type

using ripple::detail::WorkBase< WorkPlain >::request_type = boost::beast::http::request<boost::beast::http::empty_body>
protectedinherited

Definition at line 35 of file WorkBase.h.

Constructor & Destructor Documentation

◆ WorkPlain()

ripple::detail::WorkPlain::WorkPlain ( 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 40 of file WorkPlain.h.

◆ ~WorkPlain()

ripple::detail::WorkPlain::~WorkPlain ( )
default

Member Function Documentation

◆ onConnect() [1/2]

void ripple::detail::WorkPlain::onConnect ( error_code const &  ec)
private

Definition at line 53 of file WorkPlain.h.

◆ stream()

socket_type & ripple::detail::WorkPlain::stream ( )
private

Definition at line 32 of file WorkPlain.h.

◆ impl()

WorkPlain & ripple::detail::WorkBase< WorkPlain >::impl ( )
inherited

Definition at line 64 of file WorkBase.h.

◆ run()

void ripple::detail::WorkBase< WorkPlain >::run ( )
overridevirtualinherited

Implements ripple::detail::Work.

Definition at line 70 of file WorkBase.h.

◆ cancel()

void ripple::detail::WorkBase< WorkPlain >::cancel ( )
overridevirtualinherited

Implements ripple::detail::Work.

Definition at line 73 of file WorkBase.h.

◆ fail()

void ripple::detail::WorkBase< WorkPlain >::fail ( error_code const &  ec)
inherited

Definition at line 76 of file WorkBase.h.

◆ onResolve()

void ripple::detail::WorkBase< WorkPlain >::onResolve ( error_code const &  ec,
results_type  results 
)
inherited

Definition at line 79 of file WorkBase.h.

◆ onConnect() [2/2]

void ripple::detail::WorkBase< WorkPlain >::onConnect ( error_code const &  ec,
endpoint_type const &  endpoint 
)
inherited

Definition at line 82 of file WorkBase.h.

◆ onStart()

void ripple::detail::WorkBase< WorkPlain >::onStart ( )
inherited

Definition at line 85 of file WorkBase.h.

◆ onRequest()

void ripple::detail::WorkBase< WorkPlain >::onRequest ( error_code const &  ec)
inherited

Definition at line 88 of file WorkBase.h.

◆ onResponse()

void ripple::detail::WorkBase< WorkPlain >::onResponse ( error_code const &  ec)
inherited

Definition at line 91 of file WorkBase.h.

◆ close()

void ripple::detail::WorkBase< WorkPlain >::close ( )
privateinherited

Definition at line 95 of file WorkBase.h.

Friends And Related Symbol Documentation

◆ WorkBase< WorkPlain >

friend class WorkBase< WorkPlain >
friend

Definition at line 53 of file WorkPlain.h.

Member Data Documentation

◆ host_

std::string ripple::detail::WorkBase< WorkPlain >::host_
protectedinherited

Definition at line 38 of file WorkBase.h.

◆ path_

std::string ripple::detail::WorkBase< WorkPlain >::path_
protectedinherited

Definition at line 39 of file WorkBase.h.

◆ port_

std::string ripple::detail::WorkBase< WorkPlain >::port_
protectedinherited

Definition at line 40 of file WorkBase.h.

◆ cb_

callback_type ripple::detail::WorkBase< WorkPlain >::cb_
protectedinherited

Definition at line 41 of file WorkBase.h.

◆ ios_

boost::asio::io_context& ripple::detail::WorkBase< WorkPlain >::ios_
protectedinherited

Definition at line 42 of file WorkBase.h.

◆ strand_

boost::asio::strand<boost::asio::io_context::executor_type> ripple::detail::WorkBase< WorkPlain >::strand_
protectedinherited

Definition at line 43 of file WorkBase.h.

◆ resolver_

resolver_type ripple::detail::WorkBase< WorkPlain >::resolver_
protectedinherited

Definition at line 44 of file WorkBase.h.

◆ socket_

socket_type ripple::detail::WorkBase< WorkPlain >::socket_
protectedinherited

Definition at line 45 of file WorkBase.h.

◆ req_

request_type ripple::detail::WorkBase< WorkPlain >::req_
protectedinherited

Definition at line 46 of file WorkBase.h.

◆ res_

response_type ripple::detail::WorkBase< WorkPlain >::res_
protectedinherited

Definition at line 47 of file WorkBase.h.

◆ readBuf_

boost::beast::multi_buffer ripple::detail::WorkBase< WorkPlain >::readBuf_
protectedinherited

Definition at line 48 of file WorkBase.h.

◆ lastEndpoint_

endpoint_type ripple::detail::WorkBase< WorkPlain >::lastEndpoint_
protectedinherited

Definition at line 49 of file WorkBase.h.

◆ lastStatus_

bool ripple::detail::WorkBase< WorkPlain >::lastStatus_
protectedinherited

Definition at line 50 of file WorkBase.h.