xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
server
server/Writer.h
1
#pragma once
2
3
#include <boost/asio/buffer.hpp>
4
5
#include <
cstddef
>
6
#include <
functional
>
7
#include <
vector
>
8
9
namespace
xrpl
{
10
11
class
Writer
12
{
13
public
:
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
42
virtual
std::vector<boost::asio::const_buffer>
43
data
() = 0;
44
};
45
46
}
// namespace xrpl
xrpl::Writer
Definition
server/Writer.h:12
xrpl::Writer::data
virtual std::vector< boost::asio::const_buffer > data()=0
Returns a ConstBufferSequence representing the input sequence.
xrpl::Writer::prepare
virtual bool prepare(std::size_t bytes, std::function< void(void)> resume)=0
Add data to the input sequence.
xrpl::Writer::consume
virtual void consume(std::size_t bytes)=0
Removes bytes from the input sequence.
xrpl::Writer::complete
virtual bool complete()=0
Returns true if there is no more data to pull.
xrpl::Writer::~Writer
virtual ~Writer()=default
cstddef
std::function
functional
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
std::size_t
vector
Generated by
1.17.0