![]() |
libzmq master
The Intelligent Transport Layer
|
#include <reaper.hpp>
Public Member Functions | |
reaper_t (class ctx_t *ctx_, uint32_t tid_) | |
~reaper_t () | |
ctx_t * | get_ctx () |
mailbox_t * | get_mailbox () |
uint32_t | get_tid () |
void | in_event () |
void | out_event () |
void | process_command (struct command_t &cmd_) |
void | start () |
void | stop () |
void | timer_event (int id_) |
Protected Member Functions | |
class io_thread_t * | choose_io_thread (uint64_t affinity_) |
void | destroy_socket (class socket_base_t *socket_) |
struct endpoint_t | find_endpoint (const char *addr_) |
void | log (const char *format_,...) |
virtual void | process_activate_read () |
virtual void | process_activate_write (uint64_t msgs_read_) |
virtual void | process_attach (struct i_engine *engine_) |
virtual void | process_bind (class pipe_t *pipe_) |
virtual void | process_hiccup (void *pipe_) |
virtual void | process_own (class own_t *object_) |
virtual void | process_pipe_term () |
virtual void | process_pipe_term_ack () |
virtual void | process_plug () |
virtual void | process_seqnum () |
virtual void | process_term (int linger_) |
virtual void | process_term_ack () |
virtual void | process_term_req (class own_t *object_) |
int | register_endpoint (const char *addr_, struct endpoint_t &endpoint_) |
void | send_activate_read (class pipe_t *destination_) |
void | send_activate_write (class pipe_t *destination_, uint64_t msgs_read_) |
void | send_attach (class session_base_t *destination_, struct i_engine *engine_, bool inc_seqnum_=true) |
void | send_bind (class own_t *destination_, class pipe_t *pipe_, bool inc_seqnum_=true) |
void | send_done () |
void | send_hiccup (class pipe_t *destination_, void *pipe_) |
void | send_own (class own_t *destination_, class own_t *object_) |
void | send_pipe_term (class pipe_t *destination_) |
void | send_pipe_term_ack (class pipe_t *destination_) |
void | send_plug (class own_t *destination_, bool inc_seqnum_=true) |
void | send_reap (class socket_base_t *socket_) |
void | send_reaped () |
void | send_stop () |
void | send_term (class own_t *destination_, int linger_) |
void | send_term_ack (class own_t *destination_) |
void | send_term_req (class own_t *destination_, class own_t *object_) |
void | unregister_endpoints (class socket_base_t *socket_) |
Private Member Functions | |
reaper_t (const reaper_t &) | |
const reaper_t & | operator= (const reaper_t &) |
void | process_reap (class socket_base_t *socket_) |
void | process_reaped () |
void | process_stop () |
Private Attributes | |
mailbox_t | mailbox |
poller_t::handle_t | mailbox_handle |
poller_t * | poller |
int | sockets |
bool | terminating |
Definition at line 32 of file reaper.hpp.
zmq::reaper_t::reaper_t | ( | class ctx_t * | ctx_, |
uint32_t | tid_ | ||
) |
Definition at line 25 of file reaper.cpp.
References alloc_assert, zmq::mailbox_t::get_fd(), mailbox, mailbox_handle, and poller.
zmq::reaper_t::~reaper_t | ( | ) |
Definition at line 37 of file reaper.cpp.
zmq::reaper_t::reaper_t | ( | const reaper_t & | ) | [private] |
zmq::io_thread_t * zmq::object_t::choose_io_thread | ( | uint64_t | affinity_ | ) | [protected, inherited] |
Definition at line 160 of file object.cpp.
References zmq::object_t::choose_io_thread().
Referenced by zmq::object_t::choose_io_thread().
void zmq::object_t::destroy_socket | ( | class socket_base_t * | socket_ | ) | [protected, inherited] |
Definition at line 147 of file object.cpp.
zmq::endpoint_t zmq::object_t::find_endpoint | ( | const char * | addr_ | ) | [read, protected, inherited] |
Definition at line 142 of file object.cpp.
zmq::ctx_t * zmq::object_t::get_ctx | ( | ) | [inherited] |
Definition at line 54 of file object.cpp.
zmq::mailbox_t * zmq::reaper_t::get_mailbox | ( | ) |
Definition at line 42 of file reaper.cpp.
Referenced by zmq::ctx_t::ctx_t().
uint32_t zmq::object_t::get_tid | ( | ) | [inherited] |
Definition at line 49 of file object.cpp.
Referenced by zmq::ctx_t::destroy_socket(), and zmq::object_t::send_command().
void zmq::reaper_t::in_event | ( | ) | [virtual] |
Implements zmq::i_poll_events.
Definition at line 58 of file reaper.cpp.
References zmq::command_t::destination, errno_assert, and zmq::object_t::process_command().
void zmq::object_t::log | ( | const char * | format_, |
... | |||
) | [protected, inherited] |
Definition at line 152 of file object.cpp.
void zmq::reaper_t::out_event | ( | ) | [virtual] |
void zmq::object_t::process_activate_read | ( | ) | [protected, virtual, inherited] |
void zmq::object_t::process_activate_write | ( | uint64_t | msgs_read_ | ) | [protected, virtual, inherited] |
void zmq::object_t::process_attach | ( | struct i_engine * | engine_ | ) | [protected, virtual, inherited] |
Reimplemented in zmq::session_base_t.
Definition at line 380 of file object.cpp.
References zmq_assert.
void zmq::object_t::process_bind | ( | class pipe_t * | pipe_ | ) | [protected, virtual, inherited] |
Reimplemented in zmq::socket_base_t.
Definition at line 385 of file object.cpp.
References zmq_assert.
void zmq::object_t::process_command | ( | struct command_t & | cmd_ | ) | [inherited] |
Definition at line 59 of file object.cpp.
References zmq::command_t::activate_read, zmq::command_t::activate_write, zmq::command_t::args, zmq::command_t::attach, zmq::command_t::bind, zmq::command_t::hiccup, zmq::command_t::own, zmq::command_t::pipe_term, zmq::command_t::pipe_term_ack, zmq::command_t::plug, zmq::command_t::reap, zmq::command_t::reaped, zmq::command_t::stop, zmq::command_t::term, zmq::command_t::term_ack, zmq::command_t::term_req, zmq::command_t::type, and zmq_assert.
Referenced by in_event(), zmq::io_thread_t::in_event(), and zmq::socket_base_t::process_commands().
void zmq::object_t::process_hiccup | ( | void * | pipe_ | ) | [protected, virtual, inherited] |
void zmq::object_t::process_own | ( | class own_t * | object_ | ) | [protected, virtual, inherited] |
void zmq::object_t::process_pipe_term | ( | ) | [protected, virtual, inherited] |
void zmq::object_t::process_pipe_term_ack | ( | ) | [protected, virtual, inherited] |
void zmq::object_t::process_plug | ( | ) | [protected, virtual, inherited] |
Reimplemented in zmq::ipc_connecter_t, zmq::ipc_listener_t, zmq::session_base_t, zmq::tcp_connecter_t, and zmq::tcp_listener_t.
Definition at line 370 of file object.cpp.
References zmq_assert.
void zmq::reaper_t::process_reap | ( | class socket_base_t * | socket_ | ) | [private, virtual] |
Reimplemented from zmq::object_t.
Definition at line 98 of file reaper.cpp.
References zmq::socket_base_t::start_reaping().
void zmq::reaper_t::process_reaped | ( | ) | [private, virtual] |
Reimplemented from zmq::object_t.
Definition at line 106 of file reaper.cpp.
void zmq::object_t::process_seqnum | ( | ) | [protected, virtual, inherited] |
void zmq::reaper_t::process_stop | ( | ) | [private, virtual] |
Reimplemented from zmq::object_t.
Definition at line 86 of file reaper.cpp.
void zmq::object_t::process_term | ( | int | linger_ | ) | [protected, virtual, inherited] |
Reimplemented in zmq::ipc_listener_t, zmq::own_t, zmq::session_base_t, zmq::socket_base_t, and zmq::tcp_listener_t.
Definition at line 420 of file object.cpp.
References zmq_assert.
void zmq::object_t::process_term_ack | ( | ) | [protected, virtual, inherited] |
void zmq::object_t::process_term_req | ( | class own_t * | object_ | ) | [protected, virtual, inherited] |
int zmq::object_t::register_endpoint | ( | const char * | addr_, |
struct endpoint_t & | endpoint_ | ||
) | [protected, inherited] |
Definition at line 132 of file object.cpp.
void zmq::object_t::send_activate_read | ( | class pipe_t * | destination_ | ) | [protected, inherited] |
Definition at line 237 of file object.cpp.
References zmq::command_t::activate_read, zmq::command_t::destination, and zmq::command_t::type.
void zmq::object_t::send_activate_write | ( | class pipe_t * | destination_, |
uint64_t | msgs_read_ | ||
) | [protected, inherited] |
Definition at line 248 of file object.cpp.
References zmq::command_t::activate_write, zmq::command_t::args, zmq::command_t::destination, and zmq::command_t::type.
void zmq::object_t::send_attach | ( | class session_base_t * | destination_, |
struct i_engine * | engine_, | ||
bool | inc_seqnum_ = true |
||
) | [protected, inherited] |
Definition at line 205 of file object.cpp.
References zmq::command_t::args, zmq::command_t::attach, zmq::command_t::destination, zmq::own_t::inc_seqnum(), and zmq::command_t::type.
void zmq::object_t::send_bind | ( | class own_t * | destination_, |
class pipe_t * | pipe_, | ||
bool | inc_seqnum_ = true |
||
) | [protected, inherited] |
Definition at line 221 of file object.cpp.
References zmq::command_t::args, zmq::command_t::bind, zmq::command_t::destination, zmq::own_t::inc_seqnum(), and zmq::command_t::type.
void zmq::object_t::send_done | ( | ) | [protected, inherited] |
Definition at line 354 of file object.cpp.
References zmq::command_t::destination, zmq::command_t::done, zmq::ctx_t::term_tid, and zmq::command_t::type.
void zmq::object_t::send_hiccup | ( | class pipe_t * | destination_, |
void * | pipe_ | ||
) | [protected, inherited] |
Definition at line 261 of file object.cpp.
References zmq::command_t::args, zmq::command_t::destination, zmq::command_t::hiccup, and zmq::command_t::type.
void zmq::object_t::send_own | ( | class own_t * | destination_, |
class own_t * | object_ | ||
) | [protected, inherited] |
Definition at line 192 of file object.cpp.
References zmq::command_t::args, zmq::command_t::destination, zmq::own_t::inc_seqnum(), zmq::command_t::own, and zmq::command_t::type.
void zmq::object_t::send_pipe_term | ( | class pipe_t * | destination_ | ) | [protected, inherited] |
Definition at line 273 of file object.cpp.
References zmq::command_t::destination, zmq::command_t::pipe_term, and zmq::command_t::type.
void zmq::object_t::send_pipe_term_ack | ( | class pipe_t * | destination_ | ) | [protected, inherited] |
Definition at line 284 of file object.cpp.
References zmq::command_t::destination, zmq::command_t::pipe_term_ack, and zmq::command_t::type.
void zmq::object_t::send_plug | ( | class own_t * | destination_, |
bool | inc_seqnum_ = true |
||
) | [protected, inherited] |
Definition at line 178 of file object.cpp.
References zmq::command_t::destination, zmq::own_t::inc_seqnum(), zmq::command_t::plug, and zmq::command_t::type.
void zmq::object_t::send_reap | ( | class socket_base_t * | socket_ | ) | [protected, inherited] |
Definition at line 331 of file object.cpp.
References zmq::command_t::args, zmq::command_t::destination, zmq::command_t::reap, and zmq::command_t::type.
void zmq::object_t::send_reaped | ( | ) | [protected, inherited] |
Definition at line 343 of file object.cpp.
References zmq::command_t::destination, zmq::command_t::reaped, and zmq::command_t::type.
void zmq::object_t::send_stop | ( | ) | [protected, inherited] |
Definition at line 165 of file object.cpp.
References zmq::command_t::destination, zmq::command_t::stop, and zmq::command_t::type.
void zmq::object_t::send_term | ( | class own_t * | destination_, |
int | linger_ | ||
) | [protected, inherited] |
Definition at line 308 of file object.cpp.
References zmq::command_t::args, zmq::command_t::destination, zmq::command_t::term, and zmq::command_t::type.
void zmq::object_t::send_term_ack | ( | class own_t * | destination_ | ) | [protected, inherited] |
Definition at line 320 of file object.cpp.
References zmq::command_t::destination, zmq::command_t::term_ack, and zmq::command_t::type.
void zmq::object_t::send_term_req | ( | class own_t * | destination_, |
class own_t * | object_ | ||
) | [protected, inherited] |
Definition at line 295 of file object.cpp.
References zmq::command_t::args, zmq::command_t::destination, zmq::command_t::term_req, and zmq::command_t::type.
void zmq::reaper_t::start | ( | ) |
Definition at line 47 of file reaper.cpp.
Referenced by zmq::ctx_t::ctx_t().
void zmq::reaper_t::stop | ( | ) |
Definition at line 53 of file reaper.cpp.
void zmq::reaper_t::timer_event | ( | int | id_ | ) | [virtual] |
void zmq::object_t::unregister_endpoints | ( | class socket_base_t * | socket_ | ) | [protected, inherited] |
Definition at line 137 of file object.cpp.
mailbox_t zmq::reaper_t::mailbox [private] |
Definition at line 57 of file reaper.hpp.
Referenced by reaper_t().
poller_t::handle_t zmq::reaper_t::mailbox_handle [private] |
Definition at line 60 of file reaper.hpp.
Referenced by reaper_t().
poller_t* zmq::reaper_t::poller [private] |
Definition at line 63 of file reaper.hpp.
Referenced by reaper_t().
int zmq::reaper_t::sockets [private] |
Definition at line 66 of file reaper.hpp.
bool zmq::reaper_t::terminating [private] |
Definition at line 69 of file reaper.hpp.