Coverage Report

Created: 2026-03-20 06:18

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libzmq/src/v1_decoder.hpp
Line
Count
Source
1
/* SPDX-License-Identifier: MPL-2.0 */
2
3
#ifndef __ZMQ_V1_DECODER_HPP_INCLUDED__
4
#define __ZMQ_V1_DECODER_HPP_INCLUDED__
5
6
#include "decoder.hpp"
7
8
namespace zmq
9
{
10
//  Decoder for ZMTP/1.0 protocol. Converts data batches into messages.
11
12
class v1_decoder_t ZMQ_FINAL : public decoder_base_t<v1_decoder_t>
13
{
14
  public:
15
    v1_decoder_t (size_t bufsize_, int64_t maxmsgsize_);
16
    ~v1_decoder_t ();
17
18
0
    msg_t *msg () { return &_in_progress; }
19
20
  private:
21
    int one_byte_size_ready (unsigned char const *);
22
    int eight_byte_size_ready (unsigned char const *);
23
    int flags_ready (unsigned char const *);
24
    int message_ready (unsigned char const *);
25
26
    unsigned char _tmpbuf[8];
27
    msg_t _in_progress;
28
29
    const int64_t _max_msg_size;
30
31
    ZMQ_NON_COPYABLE_NOR_MOVABLE (v1_decoder_t)
32
};
33
}
34
35
#endif