Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
app::RequestHandler< RpcHandlerType > Class Template Reference

A function object that handles the websocket endpoint. More...

#include <WebHandlers.hpp>

Public Member Functions

 RequestHandler (std::shared_ptr< web::AdminVerificationStrategy > adminVerifier, RpcHandlerType &rpcHandler, web::dosguard::DOSGuardInterface &dosguard)
 Construct a new RequestHandler object.
 
web::ng::Response operator() (web::ng::Request const &request, web::ng::ConnectionMetadata &connectionMetadata, web::SubscriptionContextPtr subscriptionContext, boost::asio::yield_context yield)
 The call of the function object.
 

Detailed Description

template<typename RpcHandlerType>
class app::RequestHandler< RpcHandlerType >

A function object that handles the websocket endpoint.

Template Parameters
RpcHandlerTypeThe type of the RPC handler.

Constructor & Destructor Documentation

◆ RequestHandler()

template<typename RpcHandlerType >
app::RequestHandler< RpcHandlerType >::RequestHandler ( std::shared_ptr< web::AdminVerificationStrategy > adminVerifier,
RpcHandlerType & rpcHandler,
web::dosguard::DOSGuardInterface & dosguard )
inline

Construct a new RequestHandler object.

Parameters
adminVerifierThe AdminVerificationStrategy to use for verifying the connection for admin access.
rpcHandlerThe RPC handler to use for handling the request.
dosguardThe DOSGuardInterface to use for checking the connection.

Member Function Documentation

◆ operator()()

template<typename RpcHandlerType >
web::ng::Response app::RequestHandler< RpcHandlerType >::operator() ( web::ng::Request const & request,
web::ng::ConnectionMetadata & connectionMetadata,
web::SubscriptionContextPtr subscriptionContext,
boost::asio::yield_context yield )
inline

The call of the function object.

Parameters
requestThe request to handle.
connectionMetadataThe connection metadata.
subscriptionContextThe subscription context.
yieldThe yield context.
Returns
The response to the request.

The documentation for this class was generated from the following file: