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, EndpointType remoteAddress, beast::Journal journal)
void close () override
IOList & ios ()
 Return the IOList associated with the work.

Protected Types

using ClockType = std::chrono::system_clock
using ErrorCode = boost::system::error_code
using EndpointType = boost::asio::ip::tcp::endpoint
using WaitableTimer = boost::asio::basic_waitable_timer<ClockType>

Protected Attributes

Port const & port_
Handler & handler_
EndpointType 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

IOList * ios_ = nullptr

Detailed Description

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

Definition at line 20 of file BasePeer.h.

Member Typedef Documentation

◆ ClockType

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

Definition at line 23 of file BasePeer.h.

◆ ErrorCode

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

Definition at line 24 of file BasePeer.h.

◆ EndpointType

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

Definition at line 25 of file BasePeer.h.

◆ WaitableTimer

template<class Handler, class Impl>
using xrpl::BasePeer< Handler, Impl >::WaitableTimer = boost::asio::basic_waitable_timer<ClockType>
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,
EndpointType 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 170 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 44 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>
EndpointType 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 28 of file io_list.h.