2
Copyright (c) 2009-2011 250bpm s.r.o.
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_XREQ_HPP_INCLUDED__
22
#define __ZMQ_XREQ_HPP_INCLUDED__
24
#include "socket_base.hpp"
25
#include "session_base.hpp"
43
xreq_t (zmq::ctx_t *parent_, uint32_t tid_);
48
// Overloads of functions from socket_base_t.
49
void xattach_pipe (zmq::pipe_t *pipe_);
50
int xsend (zmq::msg_t *msg_, int flags_);
51
int xrecv (zmq::msg_t *msg_, int flags_);
54
void xread_activated (zmq::pipe_t *pipe_);
55
void xwrite_activated (zmq::pipe_t *pipe_);
56
void xterminated (zmq::pipe_t *pipe_);
60
// Messages are fair-queued from inbound pipes. And load-balanced to
61
// the outbound pipes.
65
// Have we prefetched a message.
68
// Holds the prefetched message.
71
xreq_t (const xreq_t&);
72
const xreq_t &operator = (const xreq_t&);
75
class xreq_session_t : public session_base_t
79
xreq_session_t (zmq::io_thread_t *io_thread_, bool connect_,
80
zmq::socket_base_t *socket_, const options_t &options_,
81
const char *protocol_, const char *address_);
86
xreq_session_t (const xreq_session_t&);
87
const xreq_session_t &operator = (const xreq_session_t&);