libzmq  master
ZeroMQ C++ Core Engine (LIBZMQ)
zmq::dish_t Class Reference

#include <dish.hpp>

Inheritance diagram for zmq::dish_t:
Collaboration diagram for zmq::dish_t:

Public Member Functions

 dish_t (zmq::ctx_t *parent_, uint32_t tid_, int sid_)
 
 ~dish_t ()
 
- Public Member Functions inherited from zmq::socket_base_t
int add_signaler (signaler_t *s)
 
int bind (const char *addr_)
 
bool check_tag ()
 
int close ()
 
int connect (const char *addr_)
 
void event_accept_failed (const std::string &addr_, int err_)
 
void event_accepted (const std::string &addr_, int fd_)
 
void event_bind_failed (const std::string &addr_, int err_)
 
void event_close_failed (const std::string &addr_, int fd_)
 
void event_closed (const std::string &addr_, int fd_)
 
void event_connect_delayed (const std::string &addr_, int err_)
 
void event_connect_retried (const std::string &addr_, int interval_)
 
void event_connected (const std::string &addr_, int fd_)
 
void event_disconnected (const std::string &addr_, int fd_)
 
void event_listening (const std::string &addr_, int fd_)
 
i_mailboxget_mailbox ()
 
int getsockopt (int option_, void *optval_, size_t *optvallen_)
 
bool has_in ()
 
bool has_out ()
 
void hiccuped (pipe_t *pipe_)
 
void in_event ()
 
int join (const char *group)
 
int leave (const char *group)
 
void lock ()
 
int monitor (const char *endpoint_, int events_)
 
void out_event ()
 
void pipe_terminated (pipe_t *pipe_)
 
void read_activated (pipe_t *pipe_)
 
int recv (zmq::msg_t *msg_, int flags_)
 
int remove_signaler (signaler_t *s)
 
int send (zmq::msg_t *msg_, int flags_)
 
int setsockopt (int option_, const void *optval_, size_t optvallen_)
 
void start_reaping (poller_t *poller_)
 
void stop ()
 
int term_endpoint (const char *addr_)
 
void timer_event (int id_)
 
void unlock ()
 
void write_activated (pipe_t *pipe_)
 
- Public Member Functions inherited from zmq::own_t
 own_t (zmq::ctx_t *parent_, uint32_t tid_)
 
 own_t (zmq::io_thread_t *io_thread_, const options_t &options_)
 
void inc_seqnum ()
 
void register_term_acks (int count_)
 
void unregister_term_ack ()
 
- Public Member Functions inherited from zmq::object_t
 object_t (zmq::ctx_t *ctx_, uint32_t tid_)
 
 object_t (object_t *parent_)
 
virtual ~object_t ()
 
ctx_tget_ctx ()
 
uint32_t get_tid ()
 
void process_command (zmq::command_t &cmd_)
 
void send_bind (zmq::own_t *destination_, zmq::pipe_t *pipe_, bool inc_seqnum_=true)
 
void send_inproc_connected (zmq::socket_base_t *socket_)
 
void set_tid (uint32_t id)
 
- Public Member Functions inherited from zmq::array_item_t<>
 array_item_t ()
 
virtual ~array_item_t ()
 
int get_array_index ()
 
void set_array_index (int index_)
 
- Public Member Functions inherited from zmq::i_poll_events
virtual ~i_poll_events ()
 
- Public Member Functions inherited from zmq::i_pipe_events
virtual ~i_pipe_events ()
 

Protected Member Functions

blob_t get_credential () const
 
void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_)
 
bool xhas_in ()
 
bool xhas_out ()
 
void xhiccuped (pipe_t *pipe_)
 
int xjoin (const char *group_)
 
int xleave (const char *group_)
 
void xpipe_terminated (zmq::pipe_t *pipe_)
 
void xread_activated (zmq::pipe_t *pipe_)
 
int xrecv (zmq::msg_t *msg_)
 
int xsend (zmq::msg_t *msg_)
 
void xwrite_activated (zmq::pipe_t *pipe_)
 
- Protected Member Functions inherited from zmq::socket_base_t
 socket_base_t (zmq::ctx_t *parent_, uint32_t tid_, int sid_, bool thread_safe_=false)
 
virtual ~socket_base_t ()
 
void monitor_event (int event_, int value_, const std::string &addr_)
 
void process_destroy ()
 
void stop_monitor (bool send_monitor_stopped_event_=true)
 
virtual int xsetsockopt (int option_, const void *optval_, size_t optvallen_)
 
- Protected Member Functions inherited from zmq::own_t
virtual ~own_t ()
 
bool is_terminating ()
 
void launch_child (own_t *object_)
 
void term_child (own_t *object_)
 
void terminate ()
 
- Protected Member Functions inherited from zmq::object_t
zmq::io_thread_tchoose_io_thread (uint64_t affinity_)
 
void connect_pending (const char *addr_, zmq::socket_base_t *bind_socket_)
 
void destroy_socket (zmq::socket_base_t *socket_)
 
zmq::endpoint_t find_endpoint (const char *addr_)
 
void log (const char *format_,...)
 
void pend_connection (const std::string &addr_, const endpoint_t &endpoint, pipe_t **pipes_)
 
virtual void process_activate_read ()
 
virtual void process_activate_write (uint64_t msgs_read_)
 
virtual void process_attach (zmq::i_engine *engine_)
 
virtual void process_hiccup (void *pipe_)
 
virtual void process_pipe_term ()
 
virtual void process_pipe_term_ack ()
 
virtual void process_plug ()
 
virtual void process_reap (zmq::socket_base_t *socket_)
 
virtual void process_reaped ()
 
int register_endpoint (const char *addr_, const zmq::endpoint_t &endpoint_)
 
void send_activate_read (zmq::pipe_t *destination_)
 
void send_activate_write (zmq::pipe_t *destination_, uint64_t msgs_read_)
 
void send_attach (zmq::session_base_t *destination_, zmq::i_engine *engine_, bool inc_seqnum_=true)
 
void send_done ()
 
void send_hiccup (zmq::pipe_t *destination_, void *pipe_)
 
void send_own (zmq::own_t *destination_, zmq::own_t *object_)
 
void send_pipe_term (zmq::pipe_t *destination_)
 
void send_pipe_term_ack (zmq::pipe_t *destination_)
 
void send_plug (zmq::own_t *destination_, bool inc_seqnum_=true)
 
void send_reap (zmq::socket_base_t *socket_)
 
void send_reaped ()
 
void send_stop ()
 
void send_term (zmq::own_t *destination_, int linger_)
 
void send_term_ack (zmq::own_t *destination_)
 
void send_term_req (zmq::own_t *destination_, zmq::own_t *object_)
 
int unregister_endpoint (const std::string &addr_, socket_base_t *socket_)
 
void unregister_endpoints (zmq::socket_base_t *socket_)
 

Private Types

typedef std::set< std::string > subscriptions_t
 

Private Member Functions

 dish_t (const dish_t &)
 
const dish_toperator= (const dish_t &)
 
void send_subscriptions (pipe_t *pipe_)
 

Private Attributes

dist_t dist
 
fq_t fq
 
bool has_message
 
msg_t message
 
subscriptions_t subscriptions
 

Additional Inherited Members

- Static Public Member Functions inherited from zmq::socket_base_t
static socket_base_tcreate (int type_, zmq::ctx_t *parent_, uint32_t tid_, int sid_)
 
- Protected Attributes inherited from zmq::socket_base_t
std::string connect_rid
 
- Protected Attributes inherited from zmq::own_t
options_t options
 

Detailed Description

Definition at line 49 of file dish.hpp.

Member Typedef Documentation

typedef std::set<std::string> zmq::dish_t::subscriptions_t
private

Definition at line 84 of file dish.hpp.

Constructor & Destructor Documentation

zmq::dish_t::dish_t ( zmq::ctx_t parent_,
uint32_t  tid_,
int  sid_ 
)

Definition at line 44 of file dish.cpp.

References errno_assert, zmq::msg_t::init(), zmq::options_t::linger, message, zmq::own_t::options, zmq::options_t::type, and ZMQ_DISH.

Here is the call graph for this function:

zmq::dish_t::~dish_t ( )

Definition at line 58 of file dish.cpp.

References zmq::msg_t::close(), errno_assert, and message.

Here is the call graph for this function:

zmq::dish_t::dish_t ( const dish_t )
private

Member Function Documentation

zmq::blob_t zmq::dish_t::get_credential ( ) const
protectedvirtual

Reimplemented from zmq::socket_base_t.

Definition at line 239 of file dish.cpp.

References fq, and zmq::fq_t::get_credential().

Here is the call graph for this function:

const dish_t& zmq::dish_t::operator= ( const dish_t )
private
void zmq::dish_t::send_subscriptions ( pipe_t pipe_)
private

Definition at line 244 of file dish.cpp.

References zmq::msg_t::close(), errno_assert, zmq::pipe_t::flush(), zmq::msg_t::init_join(), zmq::msg_t::set_group(), subscriptions, and zmq::pipe_t::write().

Referenced by xattach_pipe(), and xhiccuped().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::dish_t::xattach_pipe ( zmq::pipe_t pipe_,
bool  subscribe_to_all_ 
)
protectedvirtual

Implements zmq::socket_base_t.

Definition at line 64 of file dish.cpp.

References zmq::fq_t::attach(), zmq::dist_t::attach(), dist, fq, LIBZMQ_UNUSED, send_subscriptions(), and zmq_assert.

Here is the call graph for this function:

bool zmq::dish_t::xhas_in ( )
protectedvirtual

Reimplemented from zmq::socket_base_t.

Definition at line 212 of file dish.cpp.

References errno_assert, fq, zmq::msg_t::group, has_message, message, zmq::fq_t::recv(), and subscriptions.

Here is the call graph for this function:

bool zmq::dish_t::xhas_out ( )
protectedvirtual

Reimplemented from zmq::socket_base_t.

Definition at line 178 of file dish.cpp.

void zmq::dish_t::xhiccuped ( pipe_t pipe_)
protectedvirtual

Reimplemented from zmq::socket_base_t.

Definition at line 92 of file dish.cpp.

References send_subscriptions().

Here is the call graph for this function:

int zmq::dish_t::xjoin ( const char *  group_)
protectedvirtual

Reimplemented from zmq::socket_base_t.

Definition at line 98 of file dish.cpp.

References zmq::msg_t::close(), dist, errno_assert, zmq::msg_t::init_join(), zmq::dist_t::send_to_all(), zmq::msg_t::set_group(), subscriptions, and ZMQ_GROUP_MAX_LENGTH.

Here is the call graph for this function:

int zmq::dish_t::xleave ( const char *  group_)
protectedvirtual

Reimplemented from zmq::socket_base_t.

Definition at line 135 of file dish.cpp.

References zmq::msg_t::close(), dist, errno_assert, zmq::msg_t::init_leave(), zmq::dist_t::send_to_all(), zmq::msg_t::set_group(), subscriptions, and ZMQ_GROUP_MAX_LENGTH.

Here is the call graph for this function:

void zmq::dish_t::xpipe_terminated ( zmq::pipe_t pipe_)
protectedvirtual

Implements zmq::socket_base_t.

Definition at line 86 of file dish.cpp.

References dist, fq, zmq::fq_t::pipe_terminated(), and zmq::dist_t::pipe_terminated().

Here is the call graph for this function:

void zmq::dish_t::xread_activated ( zmq::pipe_t pipe_)
protectedvirtual

Reimplemented from zmq::socket_base_t.

Definition at line 76 of file dish.cpp.

References zmq::fq_t::activated(), and fq.

Here is the call graph for this function:

int zmq::dish_t::xrecv ( zmq::msg_t msg_)
protectedvirtual

Reimplemented from zmq::socket_base_t.

Definition at line 184 of file dish.cpp.

References errno_assert, fq, zmq::msg_t::group, has_message, message, zmq::msg_t::move(), zmq::fq_t::recv(), and subscriptions.

Here is the call graph for this function:

int zmq::dish_t::xsend ( zmq::msg_t msg_)
protectedvirtual

Reimplemented from zmq::socket_base_t.

Definition at line 171 of file dish.cpp.

References ENOTSUP, and LIBZMQ_UNUSED.

void zmq::dish_t::xwrite_activated ( zmq::pipe_t pipe_)
protectedvirtual

Reimplemented from zmq::socket_base_t.

Definition at line 81 of file dish.cpp.

References zmq::dist_t::activated(), and dist.

Here is the call graph for this function:

Member Data Documentation

dist_t zmq::dish_t::dist
private

Definition at line 81 of file dish.hpp.

Referenced by xattach_pipe(), xjoin(), xleave(), xpipe_terminated(), and xwrite_activated().

fq_t zmq::dish_t::fq
private

Definition at line 78 of file dish.hpp.

Referenced by get_credential(), xattach_pipe(), xhas_in(), xpipe_terminated(), xread_activated(), and xrecv().

bool zmq::dish_t::has_message
private

Definition at line 89 of file dish.hpp.

Referenced by xhas_in(), and xrecv().

msg_t zmq::dish_t::message
private

Definition at line 90 of file dish.hpp.

Referenced by dish_t(), xhas_in(), xrecv(), and ~dish_t().

subscriptions_t zmq::dish_t::subscriptions
private

Definition at line 85 of file dish.hpp.

Referenced by send_subscriptions(), xhas_in(), xjoin(), xleave(), and xrecv().