20 #ifndef RIPPLE_SERVER_BASEPEER_H_INCLUDED
21 #define RIPPLE_SERVER_BASEPEER_H_INCLUDED
23 #include <ripple/beast/utility/WrappedSink.h>
24 #include <ripple/server/Port.h>
25 #include <ripple/server/impl/LowestLayer.h>
26 #include <ripple/server/impl/io_list.h>
27 #include <boost/asio.hpp>
36 template <
class Handler,
class Impl>
51 boost::asio::executor_work_guard<boost::asio::executor>
work_;
52 boost::asio::strand<boost::asio::executor>
strand_;
58 boost::asio::executor
const& executor,
69 return *
static_cast<Impl*
>(
this);
75 template <
class Handler,
class Impl>
79 boost::asio::executor
const& executor,
84 , remote_address_(remote_address)
97 template <
class Handler,
class Impl>
101 if (!strand_.running_in_this_thread())
103 strand_,
std::bind(&BasePeer::close, impl().shared_from_this()));