xrpld
Loading...
Searching...
No Matches
server/Writer.h
1#pragma once
2
3#include <boost/asio/buffer.hpp>
4
5#include <cstddef>
6#include <functional>
7#include <vector>
8
9namespace xrpl {
10
11class Writer
12{
13public:
14 virtual ~Writer() = default;
15
19 virtual bool
20 complete() = 0;
21
27 virtual void
28 consume(std::size_t bytes) = 0;
29
36 virtual bool
37 prepare(std::size_t bytes, std::function<void(void)> resume) = 0;
38
43 data() = 0;
44};
45
46} // 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