Clio
develop
The XRP Ledger API server.
Theme:
Default
Round
Robot
Toggle main menu visibility
Loading...
Searching...
No Matches
Concepts.hpp
1
#pragma once
2
3
#include <boost/beast.hpp>
4
#include <boost/beast/core/error.hpp>
5
6
#include <concepts>
7
#include <memory>
8
#include <string>
9
10
namespace
web
{
11
12
struct
ConnectionBase
;
13
17
template
<
typename
T>
18
concept
SomeServerHandler
=
requires
(
19
T handler,
20
std::string req,
21
std::shared_ptr<ConnectionBase> ws,
22
boost::beast::error_code ec
23
) {
24
// the callback when server receives a request
25
{ handler(req, ws) };
26
};
27
31
struct
ServerTag
{
32
virtual
~ServerTag
() =
default
;
33
};
34
35
template
<
typename
T>
36
concept
SomeServer
= std::derived_from<T, ServerTag>;
37
38
}
// namespace web
web::SomeServerHandler
Specifies the requirements a Webserver handler must fulfill.
Definition
Concepts.hpp:18
web::SomeServer
Definition
Concepts.hpp:36
web
This namespace implements the web server and related components.
Definition
Types.hpp:23
web::ConnectionBase
Base class for all connections.
Definition
ConnectionBase.hpp:25
web::ServerTag
A tag class for server to help identify Server in templated code.
Definition
Concepts.hpp:31
src
web
interface
Concepts.hpp
Generated by
1.17.0