libzmq
src
raw_decoder.hpp
Go to the documentation of this file.
1
/* SPDX-License-Identifier: MPL-2.0 */
2
3
#ifndef __ZMQ_RAW_DECODER_HPP_INCLUDED__
4
#define __ZMQ_RAW_DECODER_HPP_INCLUDED__
5
6
#include "
msg.hpp
"
7
#include "
i_decoder.hpp
"
8
#include "
stdint.hpp
"
9
#include "
decoder_allocators.hpp
"
10
11
namespace
zmq
12
{
13
// Decoder for 0MQ v1 framing protocol. Converts data stream into messages.
14
15
class
raw_decoder_t
ZMQ_FINAL
:
public
i_decoder
16
{
17
public
:
18
raw_decoder_t (
size_t
bufsize_);
19
~raw_decoder_t ();
20
21
// i_decoder interface.
22
23
void
get_buffer (
unsigned
char
**
data_
,
size_t
*size_);
24
25
int
decode (
const
unsigned
char
*
data_
,
size_t
size_,
size_t
&bytes_used_);
26
27
msg_t
*
msg
() {
return
&_in_progress; }
28
29
void
resize_buffer
(
size_t
) {}
30
31
private
:
32
msg_t
_in_progress
;
33
34
shared_message_memory_allocator
_allocator
;
35
36
ZMQ_NON_COPYABLE_NOR_MOVABLE
(raw_decoder_t)
37
};
38
}
39
40
#endif
data_
StringPiece data_
Definition:
bytestream_unittest.cc:60
zmq::shared_message_memory_allocator
Definition:
decoder_allocators.hpp:53
zmq::ZMQ_FINAL::resize_buffer
void resize_buffer(size_t)
Definition:
raw_decoder.hpp:29
decoder_allocators.hpp
zmq
Definition:
zmq.hpp:229
stdint.hpp
ZMQ_NON_COPYABLE_NOR_MOVABLE
#define ZMQ_NON_COPYABLE_NOR_MOVABLE(classname)
Definition:
macros.hpp:58
zmq::ZMQ_FINAL::_in_progress
msg_t _in_progress
Definition:
raw_decoder.hpp:32
msg.hpp
zmq::ZMQ_FINAL::msg
msg_t * msg()
Definition:
raw_decoder.hpp:27
zmq::ZMQ_FINAL::_allocator
shared_message_memory_allocator _allocator
Definition:
raw_decoder.hpp:34
ZMQ_FINAL
Definition:
unittest_ip_resolver.cpp:26
i_decoder.hpp
zmq::msg_t
Definition:
msg.hpp:33
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:58