Botan 3.6.1
Crypto and TLS for C&
out_buf.h
Go to the documentation of this file.
1/*
2* Output Buffer
3* (C) 1999-2007 Jack Lloyd
4* 2012 Markus Wanner
5*
6* Botan is released under the Simplified BSD License (see license.txt)
7*/
8
9#ifndef BOTAN_OUTPUT_BUFFER_H_
10#define BOTAN_OUTPUT_BUFFER_H_
11
12#include <botan/pipe.h>
13#include <botan/types.h>
14#include <deque>
15
16namespace Botan {
17
18class SecureQueue;
19
20/**
21* Container of output buffers for Pipe
22*/
24 public:
25 size_t read(uint8_t[], size_t, Pipe::message_id);
26 size_t peek(uint8_t[], size_t, size_t, Pipe::message_id) const;
27 size_t get_bytes_read(Pipe::message_id) const;
28 size_t remaining(Pipe::message_id) const;
29
30 void add(SecureQueue*);
31 void retire();
32
34
36
37 private:
38 class SecureQueue* get(Pipe::message_id) const;
39
40 std::deque<std::unique_ptr<SecureQueue>> m_buffers;
41 Pipe::message_id m_offset;
42};
43
44} // namespace Botan
45
46#endif
Pipe::message_id message_count() const
Definition out_buf.cpp:102
size_t get_bytes_read(Pipe::message_id) const
Definition out_buf.cpp:51
size_t remaining(Pipe::message_id) const
Definition out_buf.cpp:40
size_t peek(uint8_t[], size_t, size_t, Pipe::message_id) const
Definition out_buf.cpp:29
void add(SecureQueue *)
Definition out_buf.cpp:62
size_t read(uint8_t[], size_t, Pipe::message_id)
Definition out_buf.cpp:18
size_t message_id
Definition pipe.h:34
int(* final)(unsigned char *, CTX *)