|
xrpld
|
A listening socket. More...
#include <Door.h>


Classes | |
| class | Detector |
| struct | FDStats |
Public Member Functions | |
| Door (Handler &handler, boost::asio::io_context &ioContext, Port const &port, beast::Journal j) | |
| void | run () |
| void | close () override |
| Close the Door listening socket and connections. | |
| EndpointType | getEndpoint () const |
| IOList & | ios () |
| Return the IOList associated with the work. | |
| T | shared_from_this (T... args) |
| T | weak_from_this (T... args) |
Private Types | |
| using | ClockType = std::chrono::steady_clock |
| using | TimerType = boost::asio::basic_waitable_timer<ClockType> |
| using | ErrorCode = boost::system::error_code |
| using | YieldContext = boost::asio::yield_context |
| using | ProtocolType = boost::asio::ip::tcp |
| using | AcceptorType = ProtocolType::acceptor |
| using | EndpointType = ProtocolType::endpoint |
| using | SocketType = boost::asio::ip::tcp::socket |
| using | StreamType = boost::beast::tcp_stream |
Private Member Functions | |
| void | reOpen () |
| std::optional< FDStats > | queryFdStats () const |
| bool | shouldThrottleForFds () |
| template<class ConstBufferSequence> | |
| void | create (bool ssl, ConstBufferSequence const &buffers, StreamType &&stream, EndpointType remoteAddress) |
| void | doAccept (YieldContext yield) |
| template<class = void> | |
| void | destroy () |
Private Attributes | |
| beast::Journal const | j_ |
| Port const & | port_ |
| Handler & | handler_ |
| boost::asio::io_context & | ioc_ |
| AcceptorType | acceptor_ |
| boost::asio::strand< boost::asio::io_context::executor_type > | strand_ |
| bool | ssl_ |
| bool | plain_ |
| std::chrono::milliseconds | acceptDelay_ {kInitialAcceptDelay} |
| boost::asio::steady_timer | backoffTimer_ |
| ClockType::time_point | fdSampleAt_ |
| bool | cachedThrottle_ {false} |
| IOList * | ios_ = nullptr |
Static Private Attributes | |
| static constexpr std::chrono::milliseconds | kInitialAcceptDelay {50} |
| static constexpr std::chrono::milliseconds | kMaxAcceptDelay {2000} |
| static constexpr std::uint64_t | kMaxUsedFdPercent = 70 |
| static constexpr std::chrono::milliseconds | kFdSampleInterval {250} |
A listening socket.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| xrpl::Door< Handler >::Door | ( | Handler & | handler, |
| boost::asio::io_context & | ioContext, | ||
| Port const & | port, | ||
| beast::Journal | j ) |
|
private |
|
private |
|
private |
| void xrpl::Door< Handler >::run | ( | ) |
|
overridevirtual |
Close the Door listening socket and connections.
The listening socket is closed, and all open connections belonging to the Door are closed. Thread Safety: May be called concurrently
Implements xrpl::IOList::Work.
|
nodiscard |
|
private |
|
private |
|
privateinherited |
|
inherited |
Return the IOList associated with the work.
Requirements: The call to IOList::emplace to create the work has already returned.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
private |
|
private |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
private |
|
private |