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
19
template
<
typename
T>
20
concept
SomeServerHandler
=
requires
(
21
T handler,
22
std::string req,
23
std::shared_ptr<ConnectionBase> ws,
24
boost::beast::error_code ec
25
) {
26
// the callback when server receives a request
27
{ handler(req, ws) };
28
};
29
33
struct
ServerTag
{
34
virtual
~ServerTag
() =
default
;
35
};
36
42
template
<
typename
T>
43
concept
SomeServer
= std::derived_from<T, ServerTag>;
44
45
}
// namespace web
web::SomeServerHandler
Specifies the requirements a Webserver handler must fulfill.
Definition
Concepts.hpp:20
web::SomeServer
Specifies a type that is a Server, i.e. derives from web::ServerTag.
Definition
Concepts.hpp:43
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:33
src
web
interface
Concepts.hpp
Generated by
1.17.0