libzmq
src
i_decoder.hpp
Go to the documentation of this file.
1
/* SPDX-License-Identifier: MPL-2.0 */
2
3
#ifndef __ZMQ_I_DECODER_HPP_INCLUDED__
4
#define __ZMQ_I_DECODER_HPP_INCLUDED__
5
6
#include "
macros.hpp
"
7
#include "
stdint.hpp
"
8
9
namespace
zmq
10
{
11
class
msg_t;
12
13
// Interface to be implemented by message decoder.
14
15
class
i_decoder
16
{
17
public
:
18
virtual
~i_decoder
()
ZMQ_DEFAULT
;
19
20
virtual
void
get_buffer
(
unsigned
char
**
data_
,
size_t
*size_) = 0;
21
22
virtual
void
resize_buffer
(
size_t
) = 0;
23
// Decodes data pointed to by data_.
24
// When a message is decoded, 1 is returned.
25
// When the decoder needs more data, 0 is returned.
26
// On error, -1 is returned and errno is set accordingly.
27
virtual
int
28
decode
(
const
unsigned
char
*
data_
,
size_t
size_,
size_t
&processed_) = 0;
29
30
virtual
msg_t
*
msg
() = 0;
31
};
32
}
33
34
#endif
zmq::i_decoder::~i_decoder
virtual ~i_decoder() ZMQ_DEFAULT
data_
StringPiece data_
Definition:
bytestream_unittest.cc:60
zmq::i_decoder::msg
virtual msg_t * msg()=0
ZMQ_DEFAULT
#define ZMQ_DEFAULT
Definition:
macros.hpp:43
zmq::i_decoder::get_buffer
virtual void get_buffer(unsigned char **data_, size_t *size_)=0
zmq
Definition:
zmq.hpp:229
macros.hpp
stdint.hpp
zmq::i_decoder::decode
virtual int decode(const unsigned char *data_, size_t size_, size_t &processed_)=0
zmq::i_decoder
Definition:
i_decoder.hpp:15
zmq::i_decoder::resize_buffer
virtual void resize_buffer(size_t)=0
zmq::msg_t
Definition:
msg.hpp:33
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:54