Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
web::Server< PlainSessionType, SslSessionType, HandlerType > Class Template Reference

The WebServer class. It creates server socket and start listening on it. More...

#include <Server.hpp>

Inheritance diagram for web::Server< PlainSessionType, SslSessionType, HandlerType >:
Collaboration diagram for web::Server< PlainSessionType, SslSessionType, HandlerType >:

Public Member Functions

 Server (boost::asio::io_context &ioc, std::optional< boost::asio::ssl::context > ctx, tcp::endpoint endpoint, util::TagDecoratorFactory tagFactory, dosguard::DOSGuardInterface &dosGuard, std::shared_ptr< HandlerType > handler, std::shared_ptr< AdminVerificationStrategy > adminVerification, std::uint32_t maxWsSendingQueueSize)
 Create a new instance of the web server.
 
void run ()
 Start accepting incoming connections.
 

Detailed Description

template<template< typename > class PlainSessionType, template< typename > class SslSessionType, SomeServerHandler HandlerType>
class web::Server< PlainSessionType, SslSessionType, HandlerType >

The WebServer class. It creates server socket and start listening on it.

Once there is client connection, it will accept it and pass the socket to Detector to detect ssl or plain.

Template Parameters
PlainSessionTypeThe plain session to handle non-ssl connection.
SslSessionTypeThe SSL session to handle SSL connection.
HandlerTypeThe handler to process the request and return response.

Constructor & Destructor Documentation

◆ Server()

template<template< typename > class PlainSessionType, template< typename > class SslSessionType, SomeServerHandler HandlerType>
web::Server< PlainSessionType, SslSessionType, HandlerType >::Server ( boost::asio::io_context & ioc,
std::optional< boost::asio::ssl::context > ctx,
tcp::endpoint endpoint,
util::TagDecoratorFactory tagFactory,
dosguard::DOSGuardInterface & dosGuard,
std::shared_ptr< HandlerType > handler,
std::shared_ptr< AdminVerificationStrategy > adminVerification,
std::uint32_t maxWsSendingQueueSize )
inline

Create a new instance of the web server.

Parameters
iocThe io_context to run the server on
ctxThe SSL context if any
endpointThe endpoint to listen on
tagFactoryA factory that is used to generate tags to track requests and sessions
dosGuardThe denial of service guard to use
handlerThe server handler to use
adminVerificationThe admin verification strategy to use
maxWsSendingQueueSizeThe maximum size of the sending queue for websocket

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