mirror of
https://github.com/XRPLF/rippled.git
synced 2026-02-08 16:02:27 +00:00
This change replaces all include guards in the `src/` and `include/` directories by `#pragma once`.
37 lines
855 B
C++
37 lines
855 B
C++
#pragma once
|
|
|
|
#include <xrpl/server/Writer.h>
|
|
|
|
#include <boost/beast/http/dynamic_body.hpp>
|
|
#include <boost/beast/http/message.hpp>
|
|
|
|
#include <memory>
|
|
|
|
namespace xrpl {
|
|
|
|
using http_request_type = boost::beast::http::request<boost::beast::http::dynamic_body>;
|
|
|
|
using http_response_type = boost::beast::http::response<boost::beast::http::dynamic_body>;
|
|
|
|
/** Used to indicate the result of a server connection handoff. */
|
|
struct Handoff
|
|
{
|
|
// When `true`, the Session will close the socket. The
|
|
// Handler may optionally take socket ownership using std::move
|
|
bool moved = false;
|
|
|
|
// If response is set, this determines the keep alive
|
|
bool keep_alive = false;
|
|
|
|
// When set, this will be sent back
|
|
std::shared_ptr<Writer> response;
|
|
|
|
bool
|
|
handled() const
|
|
{
|
|
return moved || response;
|
|
}
|
|
};
|
|
|
|
} // namespace xrpl
|