|
rippled
|
Represents an active WebSocket connection. More...
#include <BaseWSPeer.h>


Public Member Functions | |
| template<class Body , class Headers > | |
| BaseWSPeer (Port const &port, Handler &handler, boost::asio::executor const &executor, waitable_timer timer, endpoint_type remote_address, boost::beast::http::request< Body, Headers > &&request, beast::Journal journal) | |
| void | run () override |
| Port const & | port () const override |
| http_request_type const & | request () const override |
| boost::asio::ip::tcp::endpoint const & | remote_endpoint () const override |
| void | send (std::shared_ptr< WSMsg > w) override |
| Send a WebSockets message. | |
| void | close () override |
| void | close (boost::beast::websocket::close_reason const &reason) override |
| void | complete () override |
| Indicate that the response is complete. | |
| io_list & | ios () |
| Return the io_list associated with the work. | |
Public Attributes | |
| std::shared_ptr< void > | appDefined |
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 Member Functions | |
| Impl & | impl () |
| void | on_ws_handshake (error_code const &ec) |
| void | do_write () |
| void | on_write (error_code const &ec) |
| void | on_write_fin (error_code const &ec) |
| void | do_read () |
| void | on_read (error_code const &ec) |
| void | on_close (error_code const &ec) |
| void | start_timer () |
| void | cancel_timer () |
| void | on_ping (error_code const &ec) |
| void | on_ping_pong (boost::beast::websocket::frame_type kind, boost::beast::string_view payload) |
| void | on_timer (error_code ec) |
| template<class String > | |
| void | fail (error_code ec, String const &what) |
Protected Attributes | |
| Port const & | port_ |
| Handler & | handler_ |
| endpoint_type | remote_address_ |
| 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 | |
| template<class = void> | |
| void | destroy () |
Private Attributes | |
| http_request_type | request_ |
| boost::beast::multi_buffer | rb_ |
| boost::beast::multi_buffer | wb_ |
| std::list< std::shared_ptr< WSMsg > > | wq_ |
| bool | do_close_ = false |
| The socket has been closed, or will close after the next write finishes. | |
| boost::beast::websocket::close_reason | cr_ |
| waitable_timer | timer_ |
| bool | close_on_timer_ = false |
| bool | ping_active_ = false |
| boost::beast::websocket::ping_data | payload_ |
| error_code | ec_ |
| std::function< void(boost::beast::websocket::frame_type, boost::beast::string_view)> | control_callback_ |
| io_list * | ios_ = nullptr |
Friends | |
| class | BasePeer< Handler, Impl > |
Represents an active WebSocket connection.
Definition at line 26 of file BaseWSPeer.h.
|
protected |
Definition at line 29 of file BaseWSPeer.h.
|
protected |
Definition at line 30 of file BaseWSPeer.h.
|
protected |
Definition at line 31 of file BaseWSPeer.h.
|
protected |
Definition at line 32 of file BaseWSPeer.h.
| ripple::BaseWSPeer< Handler, Impl >::BaseWSPeer | ( | Port const & | port, |
| Handler & | handler, | ||
| boost::asio::executor const & | executor, | ||
| waitable_timer | timer, | ||
| endpoint_type | remote_address, | ||
| boost::beast::http::request< Body, Headers > && | request, | ||
| beast::Journal | journal | ||
| ) |
Definition at line 158 of file BaseWSPeer.h.
|
overridevirtual |
Implements ripple::WSSession.
Definition at line 175 of file BaseWSPeer.h.
|
overridevirtual |
Implements ripple::WSSession.
Definition at line 75 of file BaseWSPeer.h.
|
overridevirtual |
Implements ripple::WSSession.
Definition at line 81 of file BaseWSPeer.h.
|
overridevirtual |
Implements ripple::WSSession.
Definition at line 87 of file BaseWSPeer.h.
|
overridevirtual |
Send a WebSockets message.
Implements ripple::WSSession.
Definition at line 209 of file BaseWSPeer.h.
|
overridevirtual |
Reimplemented from ripple::BasePeer< Handler, Impl >.
Definition at line 235 of file BaseWSPeer.h.
|
overridevirtual |
Implements ripple::WSSession.
Definition at line 242 of file BaseWSPeer.h.
|
overridevirtual |
Indicate that the response is complete.
The handler should call this when it has completed writing the response.
Implements ripple::WSSession.
Definition at line 271 of file BaseWSPeer.h.
|
protected |
Definition at line 106 of file BaseWSPeer.h.
|
protected |
Definition at line 282 of file BaseWSPeer.h.
|
protected |
Definition at line 292 of file BaseWSPeer.h.
|
protected |
Definition at line 303 of file BaseWSPeer.h.
|
protected |
Definition at line 337 of file BaseWSPeer.h.
|
protected |
Definition at line 359 of file BaseWSPeer.h.
|
protected |
Definition at line 377 of file BaseWSPeer.h.
|
protected |
Definition at line 393 of file BaseWSPeer.h.
|
protected |
Definition at line 400 of file BaseWSPeer.h.
|
protected |
Definition at line 427 of file BaseWSPeer.h.
|
protected |
Definition at line 441 of file BaseWSPeer.h.
|
protected |
Definition at line 453 of file BaseWSPeer.h.
|
protected |
Definition at line 474 of file BaseWSPeer.h.
|
protected |
Definition at line 507 of file BaseWSPeer.h.
|
privateinherited |
|
inherited |
Return the io_list associated with the work.
Requirements: The call to io_list::emplace to create the work has already returned.
|
friend |
Definition at line 507 of file BaseWSPeer.h.
|
private |
Definition at line 38 of file BaseWSPeer.h.
|
private |
Definition at line 39 of file BaseWSPeer.h.
|
private |
Definition at line 40 of file BaseWSPeer.h.
|
private |
Definition at line 41 of file BaseWSPeer.h.
|
private |
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.
|
private |
Definition at line 46 of file BaseWSPeer.h.
|
private |
Definition at line 47 of file BaseWSPeer.h.
|
private |
Definition at line 48 of file BaseWSPeer.h.
|
private |
Definition at line 49 of file BaseWSPeer.h.
|
private |
Definition at line 50 of file BaseWSPeer.h.
|
private |
Definition at line 51 of file BaseWSPeer.h.
|
private |
Definition at line 54 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 90 of file WSSession.h.