Coverage Report

Created: 2025-07-11 06:23

/src/libzmq/src/pub.cpp
Line
Count
Source (jump to first uncovered line)
1
/* SPDX-License-Identifier: MPL-2.0 */
2
3
#include "precompiled.hpp"
4
#include "pub.hpp"
5
#include "pipe.hpp"
6
#include "err.hpp"
7
#include "msg.hpp"
8
9
zmq::pub_t::pub_t (class ctx_t *parent_, uint32_t tid_, int sid_) :
10
0
    xpub_t (parent_, tid_, sid_)
11
0
{
12
0
    options.type = ZMQ_PUB;
13
0
}
14
15
zmq::pub_t::~pub_t ()
16
0
{
17
0
}
18
19
void zmq::pub_t::xattach_pipe (pipe_t *pipe_,
20
                               bool subscribe_to_all_,
21
                               bool locally_initiated_)
22
0
{
23
0
    zmq_assert (pipe_);
24
25
    //  Don't delay pipe termination as there is no one
26
    //  to receive the delimiter.
27
0
    pipe_->set_nodelay ();
28
29
0
    xpub_t::xattach_pipe (pipe_, subscribe_to_all_, locally_initiated_);
30
0
}
31
32
int zmq::pub_t::xrecv (class msg_t *)
33
0
{
34
    //  Messages cannot be received from PUB socket.
35
0
    errno = ENOTSUP;
36
0
    return -1;
37
0
}
38
39
bool zmq::pub_t::xhas_in ()
40
0
{
41
0
    return false;
42
0
}