rippled
Loading...
Searching...
No Matches
server/Writer.h
1#pragma once
2
3#include <boost/asio/buffer.hpp>
4
5#include <functional>
6#include <vector>
7
8namespace xrpl {
9
10class Writer
11{
12public:
13 virtual ~Writer() = default;
14
16 virtual bool
17 complete() = 0;
18
23 virtual void
24 consume(std::size_t bytes) = 0;
25
31 virtual bool
32 prepare(std::size_t bytes, std::function<void(void)> resume) = 0;
33
36 data() = 0;
37};
38
39} // namespace xrpl
virtual std::vector< boost::asio::const_buffer > data()=0
Returns a ConstBufferSequence representing the input sequence.
virtual bool prepare(std::size_t bytes, std::function< void(void)> resume)=0
Add data to the input sequence.
virtual void consume(std::size_t bytes)=0
Removes bytes from the input sequence.
virtual bool complete()=0
Returns true if there is no more data to pull.
virtual ~Writer()=default
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5