Clio develop
The XRP Ledger API server.
|
The Detector class to detect if the connection is a ssl or not. More...
#include <Server.hpp>
Public Member Functions | |
Detector (tcp::socket &&socket, std::optional< std::reference_wrapper< boost::asio::ssl::context > > ctx, std::reference_wrapper< util::TagDecoratorFactory const > tagFactory, std::reference_wrapper< dosguard::DOSGuardInterface > dosGuard, std::shared_ptr< HandlerType > handler, std::shared_ptr< AdminVerificationStrategy > adminVerification, std::uint32_t maxWsSendingQueueSize) | |
Create a new detector. | |
void | fail (boost::system::error_code ec, char const *message) |
A helper function that is called when any error ocurs. | |
void | run () |
Initiate the detection. | |
void | onDetect (boost::beast::error_code ec, bool result) |
Handles detection result. | |
The Detector class to detect if the connection is a ssl or not.
If it is an SSL connection, the Detector will pass the ownership of the socket to SslSessionType, otherwise to PlainSessionType.
PlainSessionType | The plain session type |
SslSessionType | The SSL session type |
HandlerType | The executor to handle the requests |
|
inline |
Create a new detector.
socket | The socket. Ownership is transferred |
ctx | The SSL context if any |
tagFactory | A factory that is used to generate tags to track requests and sessions |
dosGuard | The denial of service guard to use |
handler | The server handler to use |
adminVerification | The admin verification strategy to use |
maxWsSendingQueueSize | The maximum size of the sending queue for websocket |
|
inline |
A helper function that is called when any error ocurs.
ec | The error code |
message | The message to include in the log |
|
inline |
Handles detection result.
ec | The error code |
result | true if SSL is detected; false otherwise |