Files
rippled/include/xrpl/server/Handoff.h
Bart 1eb0fdac65 refactor: Rename ripple namespace to xrpl (#5982)
This change renames all occurrences of `namespace ripple` and `ripple::` to `namespace xrpl` and `xrpl::`, respectively, as well as the names of test suites. It also provides a script to allow developers to replicate the changes in their local branch or fork to avoid conflicts.
2025-12-11 16:51:49 +00:00

42 lines
936 B
C++

#ifndef XRPL_SERVER_HANDOFF_H_INCLUDED
#define XRPL_SERVER_HANDOFF_H_INCLUDED
#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
#endif