2023-06-05 00:16:05 +01:00
|
|
|
/* SPDX-License-Identifier: MPL-2.0 */
|
2009-11-24 11:23:10 +01:00
|
|
|
|
2010-08-11 14:09:56 +02:00
|
|
|
#ifndef __ZMQ_PULL_HPP_INCLUDED__
|
|
|
|
#define __ZMQ_PULL_HPP_INCLUDED__
|
2009-11-24 11:23:10 +01:00
|
|
|
|
|
|
|
#include "socket_base.hpp"
|
2011-09-15 10:00:23 +02:00
|
|
|
#include "session_base.hpp"
|
2009-12-15 09:09:19 +01:00
|
|
|
#include "fq.hpp"
|
2009-11-24 11:23:10 +01:00
|
|
|
|
|
|
|
namespace zmq
|
|
|
|
{
|
2011-11-09 15:22:20 +01:00
|
|
|
class ctx_t;
|
|
|
|
class pipe_t;
|
|
|
|
class msg_t;
|
|
|
|
class io_thread_t;
|
2009-11-24 11:23:10 +01:00
|
|
|
|
2019-12-24 10:39:26 +01:00
|
|
|
class pull_t ZMQ_FINAL : public socket_base_t
|
2009-11-24 11:23:10 +01:00
|
|
|
{
|
|
|
|
public:
|
2012-03-19 19:41:20 -05:00
|
|
|
pull_t (zmq::ctx_t *parent_, uint32_t tid_, int sid_);
|
2020-02-04 11:57:58 +01:00
|
|
|
~pull_t ();
|
2018-02-01 11:46:09 +01:00
|
|
|
|
2010-08-11 14:09:56 +02:00
|
|
|
protected:
|
2014-01-08 18:25:31 +01:00
|
|
|
// Overrides of functions from socket_base_t.
|
2018-07-24 13:48:43 -05:00
|
|
|
void xattach_pipe (zmq::pipe_t *pipe_,
|
|
|
|
bool subscribe_to_all_,
|
2020-02-04 11:57:58 +01:00
|
|
|
bool locally_initiated_);
|
|
|
|
int xrecv (zmq::msg_t *msg_);
|
|
|
|
bool xhas_in ();
|
|
|
|
void xread_activated (zmq::pipe_t *pipe_);
|
|
|
|
void xpipe_terminated (zmq::pipe_t *pipe_);
|
2018-02-01 11:46:09 +01:00
|
|
|
|
2009-11-24 11:23:10 +01:00
|
|
|
private:
|
2009-12-15 09:09:19 +01:00
|
|
|
// Fair queueing object for inbound pipes.
|
2018-05-27 11:10:39 +02:00
|
|
|
fq_t _fq;
|
2018-02-01 11:46:09 +01:00
|
|
|
|
2019-12-08 19:22:04 +01:00
|
|
|
ZMQ_NON_COPYABLE_NOR_MOVABLE (pull_t)
|
2009-11-24 11:23:10 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|