|
xrpld
|
#include <PlainWSPeer.h>


Public Member Functions | |
| template<class Body, class Headers> | |
| PlainWSPeer (Port const &port, Handler &handler, endpoint_type remoteAddress, boost::beast::http::request< Body, Headers > &&request, socket_type &&socket, beast::Journal journal) | |
| void | run () override |
| Port const & | port () const override |
| http_request_type const & | request () const override |
| boost::asio::ip::tcp::endpoint const & | remoteEndpoint () const override |
| void | send (std::shared_ptr< WSMsg > w) override |
| Send a WebSockets message. | |
| void | close () override |
| virtual void | close (boost::beast::websocket::close_reason const &reason)=0 |
| void | complete () override |
| Indicate that the response is complete. | |
| IOList & | ios () |
| Return the IOList associated with the work. | |
| T | shared_from_this (T... args) |
| T | weak_from_this (T... args) |
Public Attributes | |
| std::shared_ptr< void > | appDefined |
Protected Member Functions | |
| PlainWSPeer< Handler > & | impl () |
| void | onWsHandshake (error_code const &ec) |
| void | doWrite () |
| void | onWrite (error_code const &ec) |
| void | onWriteFin (error_code const &ec) |
| void | doRead () |
| void | onRead (error_code const &ec) |
| void | onClose (error_code const &ec) |
| void | startTimer () |
| void | cancelTimer () |
| void | onPing (error_code const &ec) |
| void | onPingPong (boost::beast::websocket::frame_type kind, boost::beast::string_view payload) |
| void | onTimer (error_code ec) |
| void | fail (error_code ec, String const &what) |
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 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> |
| using | socket_type = boost::beast::tcp_stream |
Private Member Functions | |
| void | destroy () |
Private Attributes | |
| boost::beast::websocket::stream< socket_type > | ws_ |
| http_request_type | request_ |
| boost::beast::multi_buffer | rb_ |
| boost::beast::multi_buffer | wb_ |
| std::list< std::shared_ptr< WSMsg > > | wq_ |
| bool | doClose_ |
| The socket has been closed, or will close after the next write finishes. | |
| boost::beast::websocket::close_reason | cr_ |
| waitable_timer | timer_ |
| bool | closeOnTimer_ |
| bool | pingActive_ |
| boost::beast::websocket::ping_data | payload_ |
| error_code | ec_ |
| std::function< void(boost::beast::websocket::frame_type, boost::beast::string_view)> | controlCallback_ |
| IOList * | ios_ |
Friends | |
| class | BasePeer< Handler, PlainWSPeer > |
| class | BaseWSPeer< Handler, PlainWSPeer > |
Definition at line 12 of file PlainWSPeer.h.
|
private |
Definition at line 18 of file PlainWSPeer.h.
|
private |
Definition at line 19 of file PlainWSPeer.h.
|
private |
Definition at line 20 of file PlainWSPeer.h.
|
private |
Definition at line 21 of file PlainWSPeer.h.
|
private |
Definition at line 22 of file PlainWSPeer.h.
| xrpl::PlainWSPeer< Handler >::PlainWSPeer | ( | Port const & | port, |
| Handler & | handler, | ||
| endpoint_type | remoteAddress, | ||
| boost::beast::http::request< Body, Headers > && | request, | ||
| socket_type && | socket, | ||
| beast::Journal | journal ) |
Definition at line 41 of file PlainWSPeer.h.
|
overridevirtualinherited |
Implements xrpl::WSSession.
Definition at line 67 of file BaseWSPeer.h.
|
nodiscardoverridevirtualinherited |
Implements xrpl::WSSession.
Definition at line 74 of file BaseWSPeer.h.
|
nodiscardoverridevirtualinherited |
Implements xrpl::WSSession.
Definition at line 80 of file BaseWSPeer.h.
|
nodiscardoverridevirtualinherited |
Implements xrpl::WSSession.
Definition at line 86 of file BaseWSPeer.h.
|
overridevirtualinherited |
|
overridevirtualinherited |
Reimplemented from xrpl::BasePeer< Handler, PlainWSPeer< Handler > >.
Definition at line 95 of file BaseWSPeer.h.
|
pure virtualinherited |
Implemented in xrpl::BaseWSPeer< Handler, Impl >.
|
overridevirtualinherited |
Indicate that the response is complete.
The handler should call this when it has completed writing the response.
Implements xrpl::WSSession.
Definition at line 101 of file BaseWSPeer.h.
|
protectedinherited |
Definition at line 105 of file BaseWSPeer.h.
|
protectedinherited |
Definition at line 111 of file BaseWSPeer.h.
|
protectedinherited |
Definition at line 114 of file BaseWSPeer.h.
|
protectedinherited |
Definition at line 117 of file BaseWSPeer.h.
|
protectedinherited |
Definition at line 120 of file BaseWSPeer.h.
|
protectedinherited |
Definition at line 123 of file BaseWSPeer.h.
|
protectedinherited |
Definition at line 126 of file BaseWSPeer.h.
|
protectedinherited |
Definition at line 129 of file BaseWSPeer.h.
|
protectedinherited |
Definition at line 132 of file BaseWSPeer.h.
|
protectedinherited |
Definition at line 135 of file BaseWSPeer.h.
|
protectedinherited |
Definition at line 138 of file BaseWSPeer.h.
|
protectedinherited |
Definition at line 141 of file BaseWSPeer.h.
|
protectedinherited |
Definition at line 144 of file BaseWSPeer.h.
|
protectedinherited |
Definition at line 148 of file BaseWSPeer.h.
|
privateinherited |
|
inherited |
Return the IOList associated with the work.
Requirements: The call to IOList::emplace to create the work has already returned.
|
friend |
Definition at line 41 of file PlainWSPeer.h.
|
friend |
Definition at line 41 of file PlainWSPeer.h.
|
private |
Definition at line 24 of file PlainWSPeer.h.
|
privateinherited |
Definition at line 38 of file BaseWSPeer.h.
|
privateinherited |
Definition at line 39 of file BaseWSPeer.h.
|
privateinherited |
Definition at line 40 of file BaseWSPeer.h.
|
privateinherited |
Definition at line 41 of file BaseWSPeer.h.
|
privateinherited |
The socket has been closed, or will close after the next write finishes.
Do not do any more writes, and don't try to close again.
Definition at line 45 of file BaseWSPeer.h.
|
privateinherited |
Definition at line 46 of file BaseWSPeer.h.
|
privateinherited |
Definition at line 47 of file BaseWSPeer.h.
|
privateinherited |
Definition at line 48 of file BaseWSPeer.h.
|
privateinherited |
Definition at line 49 of file BaseWSPeer.h.
|
privateinherited |
Definition at line 50 of file BaseWSPeer.h.
|
privateinherited |
Definition at line 51 of file BaseWSPeer.h.
|
privateinherited |
Definition at line 53 of file BaseWSPeer.h.
|
protectedinherited |
Definition at line 28 of file BasePeer.h.
|
protectedinherited |
Definition at line 29 of file BasePeer.h.
|
protectedinherited |
Definition at line 30 of file BasePeer.h.
|
protectedinherited |
Definition at line 31 of file BasePeer.h.
|
protectedinherited |
Definition at line 32 of file BasePeer.h.
|
protectedinherited |
Definition at line 34 of file BasePeer.h.
|
protectedinherited |
Definition at line 35 of file BasePeer.h.
|
privateinherited |
|
inherited |
Definition at line 88 of file WSSession.h.