xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
server
Handoff.h
1
#pragma once
2
3
#include <xrpl/server/Writer.h>
4
5
#include <boost/beast/http/dynamic_body.hpp>
6
#include <boost/beast/http/message.hpp>
7
8
#include <
memory
>
9
10
namespace
xrpl
{
11
12
using
HttpRequestType
= boost::beast::http::request<boost::beast::http::dynamic_body>;
13
14
using
HttpResponseType
= boost::beast::http::response<boost::beast::http::dynamic_body>;
15
19
struct
Handoff
20
{
21
// When `true`, the Session will close the socket. The
22
// Handler may optionally take socket ownership using std::move
23
bool
moved
=
false
;
24
25
// If response is set, this determines the keep alive
26
bool
keepAlive
=
false
;
27
28
// When set, this will be sent back
29
std::shared_ptr<Writer>
response
;
30
31
[[nodiscard]]
bool
32
handled
()
const
33
{
34
return
moved
||
response
;
35
}
36
};
37
38
}
// namespace xrpl
memory
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::HttpRequestType
boost::beast::http::request< boost::beast::http::dynamic_body > HttpRequestType
Definition
Handoff.h:12
xrpl::HttpResponseType
boost::beast::http::response< boost::beast::http::dynamic_body > HttpResponseType
Definition
Handoff.h:14
std::shared_ptr
xrpl::Handoff
Used to indicate the result of a server connection handoff.
Definition
Handoff.h:20
xrpl::Handoff::keepAlive
bool keepAlive
Definition
Handoff.h:26
xrpl::Handoff::response
std::shared_ptr< Writer > response
Definition
Handoff.h:29
xrpl::Handoff::moved
bool moved
Definition
Handoff.h:23
xrpl::Handoff::handled
bool handled() const
Definition
Handoff.h:32
Generated by
1.17.0