rippled
|
Public Member Functions | |
template<class ConstBufferSequence > | |
SSLHTTPPeer (Port const &port, Handler &handler, boost::asio::io_context &ioc, beast::Journal journal, endpoint_type remote_address, ConstBufferSequence const &buffers, middle_type &&stream) | |
void | run () |
std::shared_ptr< WSSession > | websocketUpgrade () override |
Convert the connection to WebSocket. More... | |
Session & | session () |
void | close () override |
io_list & | ios () |
Return the io_list associated with the work. More... | |
T | shared_from_this (T... args) |
T | weak_from_this (T... args) |
void | write (std::string const &s) |
Send a copy of data asynchronously. More... | |
template<typename BufferSequence > | |
void | write (BufferSequence const &buffers) |
void | write (std::string const &s) |
Send a copy of data asynchronously. More... | |
template<typename BufferSequence > | |
void | write (BufferSequence const &buffers) |
void | write (std::string const &s) |
Send a copy of data asynchronously. More... | |
template<typename BufferSequence > | |
void | write (BufferSequence const &buffers) |
void | write (std::string const &s) |
Send a copy of data asynchronously. More... | |
template<typename BufferSequence > | |
void | write (BufferSequence const &buffers) |
void | write (std::string const &s) |
Send a copy of data asynchronously. More... | |
template<typename BufferSequence > | |
void | write (BufferSequence const &buffers) |
Public Attributes | |
void * | tag = nullptr |
A user-definable pointer. More... | |
Protected Types | |
enum | |
using | clock_type = std::chrono::system_clock |
Protected Member Functions | |
void | close (bool graceful) override |
Close the session. More... | |
SSLHTTPPeer< Handler > & | impl () |
void | fail (error_code ec, char const *what) |
void | start_timer () |
void | cancel_timer () |
void | on_timer () |
void | do_read (yield_context do_yield) |
void | on_write (error_code const &ec, std::size_t bytes_transferred) |
void | do_writer (std::shared_ptr< Writer > const &writer, bool keep_alive, yield_context do_yield) |
beast::Journal | journal () override |
Returns the Journal to use for logging. More... | |
Port const & | port () override |
Returns the Port settings for this connection. More... | |
beast::IP::Endpoint | remoteAddress () override |
Returns the remote address of the connection. More... | |
http_request_type & | request () override |
Returns the current HTTP request. More... | |
void | write (void const *buffer, std::size_t bytes) override |
void | write (std::shared_ptr< Writer > const &writer, bool keep_alive) override |
std::shared_ptr< Session > | detach () override |
Detach the session. More... | |
void | complete () override |
Indicate that the response is complete. More... | |
Protected Attributes | |
Port const & | port_ |
Handler & | handler_ |
boost::asio::executor_work_guard< boost::asio::executor > | work_ |
boost::asio::strand< boost::asio::executor > | strand_ |
endpoint_type | remote_address_ |
const beast::Journal | journal_ |
std::string | id_ |
std::size_t | nid_ |
boost::asio::streambuf | read_buf_ |
http_request_type | message_ |
std::vector< buffer > | wq_ |
std::vector< buffer > | wq2_ |
std::mutex | mutex_ |
bool | graceful_ |
bool | complete_ |
boost::system::error_code | ec_ |
int | request_count_ |
std::size_t | bytes_in_ |
std::size_t | bytes_out_ |
Private Types | |
using | socket_type = boost::asio::ip::tcp::socket |
using | middle_type = boost::beast::tcp_stream |
using | stream_type = boost::beast::ssl_stream< middle_type > |
using | endpoint_type = boost::asio::ip::tcp::endpoint |
using | yield_context = boost::asio::yield_context |
using | error_code = boost::system::error_code |
Private Member Functions | |
void | do_handshake (yield_context do_yield) |
void | do_request () override |
void | do_close () override |
void | on_shutdown (error_code ec) |
template<class = void> | |
void | destroy () |
Private Attributes | |
std::unique_ptr< stream_type > | stream_ptr_ |
stream_type & | stream_ |
socket_type & | socket_ |
io_list * | ios_ = nullptr |
Friends | |
class | BaseHTTPPeer< Handler, SSLHTTPPeer > |
Definition at line 35 of file SSLHTTPPeer.h.
|
private |
Definition at line 40 of file SSLHTTPPeer.h.
|
private |
Definition at line 41 of file SSLHTTPPeer.h.
|
private |
Definition at line 42 of file SSLHTTPPeer.h.
|
private |
Definition at line 43 of file SSLHTTPPeer.h.
|
private |
Definition at line 44 of file SSLHTTPPeer.h.
|
private |
Definition at line 45 of file SSLHTTPPeer.h.
|
protectedinherited |
Definition at line 52 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 57 of file BaseHTTPPeer.h.
ripple::SSLHTTPPeer< Handler >::SSLHTTPPeer | ( | Port const & | port, |
Handler & | handler, | ||
boost::asio::io_context & | ioc, | ||
beast::Journal | journal, | ||
endpoint_type | remote_address, | ||
ConstBufferSequence const & | buffers, | ||
middle_type && | stream | ||
) |
Definition at line 86 of file SSLHTTPPeer.h.
void ripple::SSLHTTPPeer< Handler >::run |
Definition at line 112 of file SSLHTTPPeer.h.
|
overridevirtual |
Convert the connection to WebSocket.
Implements ripple::Session.
Definition at line 133 of file SSLHTTPPeer.h.
|
private |
Definition at line 147 of file SSLHTTPPeer.h.
|
overrideprivatevirtual |
Implements ripple::BaseHTTPPeer< Handler, SSLHTTPPeer< Handler > >.
Definition at line 178 of file SSLHTTPPeer.h.
|
overrideprivatevirtual |
Implements ripple::BaseHTTPPeer< Handler, SSLHTTPPeer< Handler > >.
Definition at line 196 of file SSLHTTPPeer.h.
|
private |
Definition at line 209 of file SSLHTTPPeer.h.
|
inherited |
Definition at line 117 of file BaseHTTPPeer.h.
|
overridevirtualinherited |
Implements ripple::io_list::work.
Definition at line 241 of file BaseHTTPPeer.h.
|
overrideprotectedvirtualinherited |
Close the session.
This will be performed asynchronously. The session will be closed gracefully after all pending writes have completed.
graceful | true to wait until all data has finished sending. |
Implements ripple::Session.
Definition at line 504 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 127 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 256 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 269 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 280 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 288 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 299 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 320 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 368 of file BaseHTTPPeer.h.
|
overrideprotectedvirtualinherited |
Returns the Journal to use for logging.
Implements ripple::Session.
Definition at line 165 of file BaseHTTPPeer.h.
|
overrideprotectedvirtualinherited |
Returns the Port settings for this connection.
Implements ripple::Session.
Definition at line 171 of file BaseHTTPPeer.h.
|
overrideprotectedvirtualinherited |
Returns the remote address of the connection.
Implements ripple::Session.
Definition at line 177 of file BaseHTTPPeer.h.
|
overrideprotectedvirtualinherited |
Returns the current HTTP request.
Implements ripple::Session.
Definition at line 183 of file BaseHTTPPeer.h.
|
overrideprotectedvirtualinherited |
Implements ripple::Session.
Definition at line 421 of file BaseHTTPPeer.h.
|
overrideprotectedvirtualinherited |
Implements ripple::Session.
Definition at line 446 of file BaseHTTPPeer.h.
|
inherited |
|
inherited |
|
overrideprotectedvirtualinherited |
Detach the session.
This holds the session open so that the response can be sent asynchronously. Calls to io_service::run made by the server will not return until all detached sessions are closed.
Implements ripple::Session.
Definition at line 464 of file BaseHTTPPeer.h.
|
overrideprotectedvirtualinherited |
Indicate that the response is complete.
The handler should call this when it has completed writing the response. If Keep-Alive is indicated on the connection, this will trigger a read for the next request; else, the connection will be closed when all remaining data has been sent.
Implements ripple::Session.
Definition at line 473 of file BaseHTTPPeer.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 39 of file SSLHTTPPeer.h.
|
private |
Definition at line 47 of file SSLHTTPPeer.h.
|
private |
Definition at line 48 of file SSLHTTPPeer.h.
|
private |
Definition at line 49 of file SSLHTTPPeer.h.
|
protectedinherited |
Definition at line 79 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 80 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 81 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 82 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 83 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 84 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 86 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 87 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 89 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 90 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 91 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 92 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 93 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 94 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 95 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 96 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 98 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 99 of file BaseHTTPPeer.h.
|
protectedinherited |
Definition at line 100 of file BaseHTTPPeer.h.
|
privateinherited |