xrpld
Loading...
Searching...
No Matches
xrpl::BasePeer< Handler, Impl > Class Template Reference

#include <BasePeer.h>

Inheritance diagram for xrpl::BasePeer< Handler, Impl >:
Collaboration diagram for xrpl::BasePeer< Handler, Impl >:

Public Member Functions

 BasePeer (Port const &port, Handler &handler, boost::asio::executor const &executor, endpoint_type remoteAddress, beast::Journal journal)
void close () override
IOListios ()
 Return the IOList associated with the work.

Protected Types

using clock_type = std::chrono::system_clock
using error_code = boost::system::error_code
using endpoint_type = boost::asio::ip::tcp::endpoint
using waitable_timer = boost::asio::basic_waitable_timer<clock_type>

Protected Attributes

Port const & port_
Handler & handler_
endpoint_type remoteAddress_
beast::WrappedSink sink_
beast::Journal const j_
boost::asio::executor_work_guard< boost::asio::executor > work_
boost::asio::strand< boost::asio::executor > strand_

Private Member Functions

Impl & impl ()
template<class = void>
void destroy ()

Private Attributes

IOListios_ = nullptr

Detailed Description

template<class Handler, class Impl>
class xrpl::BasePeer< Handler, Impl >

Definition at line 20 of file BasePeer.h.

Member Typedef Documentation

◆ clock_type

template<class Handler, class Impl>
using xrpl::BasePeer< Handler, Impl >::clock_type = std::chrono::system_clock
protected

Definition at line 23 of file BasePeer.h.

◆ error_code

template<class Handler, class Impl>
using xrpl::BasePeer< Handler, Impl >::error_code = boost::system::error_code
protected

Definition at line 24 of file BasePeer.h.

◆ endpoint_type

template<class Handler, class Impl>
using xrpl::BasePeer< Handler, Impl >::endpoint_type = boost::asio::ip::tcp::endpoint
protected

Definition at line 25 of file BasePeer.h.

◆ waitable_timer

template<class Handler, class Impl>
using xrpl::BasePeer< Handler, Impl >::waitable_timer = boost::asio::basic_waitable_timer<clock_type>
protected

Definition at line 26 of file BasePeer.h.

Constructor & Destructor Documentation

◆ BasePeer()

template<class Handler, class Impl>
xrpl::BasePeer< Handler, Impl >::BasePeer ( Port const & port,
Handler & handler,
boost::asio::executor const & executor,
endpoint_type remoteAddress,
beast::Journal journal )

Definition at line 60 of file BasePeer.h.

Member Function Documentation

◆ close()

template<class Handler, class Impl>
void xrpl::BasePeer< Handler, Impl >::close ( )
overridevirtual

◆ impl()

template<class Handler, class Impl>
Impl & xrpl::BasePeer< Handler, Impl >::impl ( )
private

Definition at line 51 of file BasePeer.h.

◆ destroy()

template<class = void>
void xrpl::IOList::Work::destroy ( )
privateinherited

Definition at line 162 of file io_list.h.

◆ ios()

IOList & xrpl::IOList::Work::ios ( )
inherited

Return the IOList associated with the work.

Requirements: The call to IOList::emplace to create the work has already returned.

Definition at line 40 of file io_list.h.

Member Data Documentation

◆ port_

template<class Handler, class Impl>
Port const& xrpl::BasePeer< Handler, Impl >::port_
protected

Definition at line 28 of file BasePeer.h.

◆ handler_

template<class Handler, class Impl>
Handler& xrpl::BasePeer< Handler, Impl >::handler_
protected

Definition at line 29 of file BasePeer.h.

◆ remoteAddress_

template<class Handler, class Impl>
endpoint_type xrpl::BasePeer< Handler, Impl >::remoteAddress_
protected

Definition at line 30 of file BasePeer.h.

◆ sink_

template<class Handler, class Impl>
beast::WrappedSink xrpl::BasePeer< Handler, Impl >::sink_
protected

Definition at line 31 of file BasePeer.h.

◆ j_

template<class Handler, class Impl>
beast::Journal const xrpl::BasePeer< Handler, Impl >::j_
protected

Definition at line 32 of file BasePeer.h.

◆ work_

template<class Handler, class Impl>
boost::asio::executor_work_guard<boost::asio::executor> xrpl::BasePeer< Handler, Impl >::work_
protected

Definition at line 34 of file BasePeer.h.

◆ strand_

template<class Handler, class Impl>
boost::asio::strand<boost::asio::executor> xrpl::BasePeer< Handler, Impl >::strand_
protected

Definition at line 35 of file BasePeer.h.

◆ ios_

IOList* xrpl::IOList::Work::ios_ = nullptr
privateinherited

Definition at line 25 of file io_list.h.