Files
rippled/include/xrpl/server/Handoff.h
Bart 34ef577604 refactor: Replace include guards by '#pragma once' (#6322)
This change replaces all include guards in the `src/` and `include/` directories by `#pragma once`.
2026-02-04 09:50:21 -05:00

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