1#ifndef XRPL_SERVER_SIMPLEWRITER_H_INCLUDED 
    2#define XRPL_SERVER_SIMPLEWRITER_H_INCLUDED 
    4#include <xrpl/server/Writer.h> 
    6#include <boost/beast/core/multi_buffer.hpp> 
    7#include <boost/beast/core/ostream.hpp> 
    8#include <boost/beast/http/message.hpp> 
    9#include <boost/beast/http/write.hpp> 
   18    boost::beast::multi_buffer 
sb_;
 
   21    template <
bool isRequest, 
class Body, 
class Fields>
 
   23        boost::beast::http::message<isRequest, Body, Fields> 
const& msg)
 
   25        boost::beast::ostream(
sb_) << msg;
 
 
   31        return sb_.size() == 0;
 
 
   49        auto const& buf = 
sb_.data();
 
   52        for (
auto const b : buf)
 
 
 
Deprecated: Writer that serializes a HTTP/1 message.
 
std::vector< boost::asio::const_buffer > data() override
Returns a ConstBufferSequence representing the input sequence.
 
SimpleWriter(boost::beast::http::message< isRequest, Body, Fields > const &msg)
 
void consume(std::size_t bytes) override
Removes bytes from the input sequence.
 
bool prepare(std::size_t bytes, std::function< void(void)>) override
Add data to the input sequence.
 
boost::beast::multi_buffer sb_
 
bool complete() override
Returns true if there is no more data to pull.
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.