2
Copyright (c) 2007-2011 iMatix Corporation
3
Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
5
This file is part of 0MQ.
7
0MQ is free software; you can redistribute it and/or modify it under
8
the terms of the GNU Lesser General Public License as published by
9
the Free Software Foundation; either version 3 of the License, or
10
(at your option) any later version.
12
0MQ is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU Lesser General Public License for more details.
17
You should have received a copy of the GNU Lesser General Public License
18
along with this program. If not, see <http://www.gnu.org/licenses/>.
21
#ifndef __ZMQ_XSUB_HPP_INCLUDED__
22
#define __ZMQ_XSUB_HPP_INCLUDED__
24
#include "../include/zmq.h"
27
#include "socket_base.hpp"
33
class xsub_t : public socket_base_t
37
xsub_t (class ctx_t *parent_, uint32_t tid_);
42
// Overloads of functions from socket_base_t.
43
void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
44
const blob_t &peer_identity_);
45
int xsend (zmq_msg_t *msg_, int options_);
47
int xrecv (zmq_msg_t *msg_, int flags_);
52
// Hook into the termination process.
53
void process_term (int linger_);
55
// Check whether the message matches at least one subscription.
56
bool match (zmq_msg_t *msg_);
58
// Fair queueing object for inbound pipes.
61
// The repository of subscriptions.
64
// If true, 'message' contains a matching message to return on the
69
// If true, part of a multipart message was already received, but
70
// there are following parts still waiting.
73
xsub_t (const xsub_t&);
74
const xsub_t &operator = (const xsub_t&);