|
Clio
develop
The XRP Ledger API server.
|
This namespace implements the web server and related components. More...
Classes | |
| class | AdminVerificationStrategy |
| Interface for admin verification strategies. More... | |
| struct | ConnectionBase |
| Base class for all connections. More... | |
| struct | Context |
| Context that is used by the Webserver to pass around information about an incoming request. More... | |
| class | Detector |
| The Detector class to detect if the connection is a ssl or not. More... | |
| class | HttpSession |
| Represents a HTTP connection established by a client. More... | |
| class | IPAdminVerificationStrategy |
| Admin verification strategy that checks the ip address of the client. More... | |
| class | PasswordAdminVerificationStrategy |
| Admin verification strategy that checks the password from the request header. More... | |
| class | PlainWsSession |
| Represents a non-secure websocket session. More... | |
| class | ProxyIpResolver |
| Resolves the client's IP address, considering proxy servers. More... | |
| class | Resolver |
| Simple hostnames to IP addresses resolver. More... | |
| class | RPCServerHandler |
| The server handler for RPC requests called by web server. More... | |
| class | Server |
| The WebServer class. It creates server socket and start listening on it. More... | |
| class | SslHttpSession |
| Represents a HTTPS connection established by a client. More... | |
| class | SslWsSession |
| Represents a secure websocket session. More... | |
| class | SslWsUpgrader |
| The HTTPS upgrader class, upgrade from an HTTPS session to a secure websocket session. More... | |
| class | SubscriptionContext |
| A context of a WsBase connection for subscriptions. More... | |
| class | SubscriptionContextInterface |
| An interface to provide connection functionality for subscriptions. More... | |
| class | WsUpgrader |
| The websocket upgrader class, upgrade from an HTTP session to a non-secure websocket session. More... | |
Concepts | |
| concept | SomeServerHandler |
| Specifies the requirements a Webserver handler must fulfill. | |
| concept | SomeResolver |
| The requirements of a resolver. | |
Typedefs | |
| using | tcp = boost::asio::ip::tcp |
| template<typename HandlerType> | |
| using | HttpServer = Server<HttpSession, SslHttpSession, HandlerType> |
| The final type of the HttpServer used by Clio. | |
| using | SubscriptionContextPtr = std::shared_ptr<SubscriptionContextInterface> |
| An alias for shared pointer to a SubscriptionContextInterface. | |
Functions | |
| std::shared_ptr< AdminVerificationStrategy > | makeAdminVerificationStrategy (std::optional< std::string > password) |
| Factory function for creating an admin verification strategy. | |
| std::expected< std::shared_ptr< AdminVerificationStrategy >, std::string > | makeAdminVerificationStrategy (util::config::ClioConfigDefinition const &serverConfig) |
| Factory function for creating an admin verification strategy from server config. | |
| template<typename HandlerType> | |
| static std::shared_ptr< HttpServer< HandlerType > > | makeHttpServer (util::config::ClioConfigDefinition const &config, boost::asio::io_context &ioc, dosguard::DOSGuardInterface &dosGuard, std::shared_ptr< HandlerType > const &handler, std::reference_wrapper< data::LedgerCacheInterface const > cache) |
| A factory function that spawns a ready to use HTTP server. | |
This namespace implements the web server and related components.
The web server is leveraging the power of boost::asio with it's coroutine support thru boost::asio::yield_context and boost::asio::spawn.
Majority of the code is based on examples that came with boost.
| std::shared_ptr< AdminVerificationStrategy > web::makeAdminVerificationStrategy | ( | std::optional< std::string > | password | ) |
Factory function for creating an admin verification strategy.
| password | The optional password to check. |
| std::expected< std::shared_ptr< AdminVerificationStrategy >, std::string > web::makeAdminVerificationStrategy | ( | util::config::ClioConfigDefinition const & | serverConfig | ) |
Factory function for creating an admin verification strategy from server config.
| serverConfig | The clio config. |
|
static |
A factory function that spawns a ready to use HTTP server.
| HandlerType | The type of handler to process the request |
| config | The config to create server |
| ioc | The server will run under this io_context |
| dosGuard | The dos guard to protect the server |
| handler | The handler to process the request |
| cache | The ledger cache to use |