![]() |
libzmq master
The Intelligent Transport Layer
|
#include <ipc_connecter.hpp>
Public Member Functions | |
ipc_connecter_t (class io_thread_t *io_thread_, class session_base_t *session_, const options_t &options_, const char *address_, bool delay_) | |
~ipc_connecter_t () | |
ctx_t * | get_ctx () |
uint32_t | get_tid () |
void | inc_seqnum () |
void | plug (class io_thread_t *io_thread_) |
void | process_command (struct command_t &cmd_) |
void | register_term_acks (int count_) |
void | unplug () |
void | unregister_term_ack () |
Protected Types | |
typedef poller_t::handle_t | handle_t |
Protected Member Functions | |
handle_t | add_fd (fd_t fd_) |
void | add_timer (int timout_, int id_) |
void | cancel_timer (int id_) |
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_) |
bool | is_terminating () |
void | launch_child (own_t *object_) |
void | launch_sibling (own_t *object_) |
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_destroy () |
virtual void | process_hiccup (void *pipe_) |
virtual void | process_pipe_term () |
virtual void | process_pipe_term_ack () |
virtual void | process_reap (class socket_base_t *socket_) |
virtual void | process_reaped () |
virtual void | process_stop () |
void | process_term (int linger_) |
int | register_endpoint (const char *addr_, struct endpoint_t &endpoint_) |
void | reset_pollin (handle_t handle_) |
void | reset_pollout (handle_t handle_) |
void | rm_fd (handle_t handle_) |
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 | set_pollin (handle_t handle_) |
void | set_pollout (handle_t handle_) |
void | terminate () |
void | unregister_endpoints (class socket_base_t *socket_) |
Protected Attributes | |
options_t | options |
Private Types | |
enum | { reconnect_timer_id = 1 } |
Private Member Functions | |
ipc_connecter_t (const ipc_connecter_t &) | |
void | add_reconnect_timer () |
int | close () |
fd_t | connect () |
int | get_new_reconnect_ivl () |
void | in_event () |
int | open () |
const ipc_connecter_t & | operator= (const ipc_connecter_t &) |
void | out_event () |
void | process_plug () |
int | set_address (const char *addr_) |
void | start_connecting () |
void | timer_event (int id_) |
Private Attributes | |
ipc_address_t | address |
int | current_reconnect_ivl |
handle_t | handle |
bool | handle_valid |
fd_t | s |
class session_base_t * | session |
bool | wait |
Definition at line 37 of file ipc_connecter.hpp.
typedef poller_t::handle_t zmq::io_object_t::handle_t [protected, inherited] |
Definition at line 52 of file io_object.hpp.
anonymous enum [private] |
Definition at line 51 of file ipc_connecter.hpp.
zmq::ipc_connecter_t::ipc_connecter_t | ( | class io_thread_t * | io_thread_, |
class session_base_t * | session_, | ||
const options_t & | options_, | ||
const char * | address_, | ||
bool | delay_ | ||
) |
Definition at line 40 of file ipc_connecter.cpp.
References set_address(), and zmq_assert.
zmq::ipc_connecter_t::~ipc_connecter_t | ( | ) |
Definition at line 57 of file ipc_connecter.cpp.
zmq::ipc_connecter_t::ipc_connecter_t | ( | const ipc_connecter_t & | ) | [private] |
zmq::io_object_t::handle_t zmq::io_object_t::add_fd | ( | fd_t | fd_ | ) | [protected, inherited] |
Definition at line 55 of file io_object.cpp.
void zmq::ipc_connecter_t::add_reconnect_timer | ( | ) | [private] |
Definition at line 142 of file ipc_connecter.cpp.
void zmq::io_object_t::add_timer | ( | int | timout_, |
int | id_ | ||
) | [protected, inherited] |
Definition at line 85 of file io_object.cpp.
void zmq::io_object_t::cancel_timer | ( | int | id_ | ) | [protected, inherited] |
Definition at line 90 of file io_object.cpp.
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().
int zmq::ipc_connecter_t::close | ( | ) | [private] |
Definition at line 195 of file ipc_connecter.cpp.
References zmq_assert.
zmq::fd_t zmq::ipc_connecter_t::connect | ( | ) | [private] |
Definition at line 205 of file ipc_connecter.cpp.
References ECONNREFUSED, ENETDOWN, and errno_assert.
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.
int zmq::ipc_connecter_t::get_new_reconnect_ivl | ( | ) | [private] |
Definition at line 147 of file ipc_connecter.cpp.
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::ipc_connecter_t::in_event | ( | ) | [private, virtual] |
Reimplemented from zmq::io_object_t.
Definition at line 76 of file ipc_connecter.cpp.
void zmq::own_t::inc_seqnum | ( | ) | [inherited] |
Definition at line 56 of file own.cpp.
Referenced by zmq::ctx_t::find_endpoint(), zmq::tcp_listener_t::in_event(), zmq::ipc_listener_t::in_event(), zmq::object_t::send_attach(), zmq::object_t::send_bind(), zmq::object_t::send_own(), and zmq::object_t::send_plug().
void zmq::own_t::launch_child | ( | own_t * | object_ | ) | [protected, inherited] |
Definition at line 71 of file own.cpp.
References zmq::own_t::set_owner().
void zmq::own_t::launch_sibling | ( | own_t * | object_ | ) | [protected, inherited] |
Definition at line 83 of file own.cpp.
References zmq::own_t::set_owner().
void zmq::object_t::log | ( | const char * | format_, |
... | |||
) | [protected, inherited] |
Definition at line 152 of file object.cpp.
int zmq::ipc_connecter_t::open | ( | ) | [private] |
Definition at line 172 of file ipc_connecter.cpp.
References zmq_assert.
const ipc_connecter_t& zmq::ipc_connecter_t::operator= | ( | const ipc_connecter_t & | ) | [private] |
void zmq::ipc_connecter_t::out_event | ( | ) | [private, virtual] |
Reimplemented from zmq::io_object_t.
Definition at line 84 of file ipc_connecter.cpp.
References alloc_assert.
void zmq::io_object_t::plug | ( | class io_thread_t * | io_thread_ | ) | [inherited] |
Definition at line 37 of file io_object.cpp.
References zmq::io_thread_t::get_poller(), and zmq_assert.
Referenced by zmq::io_object_t::io_object_t(), and zmq::stream_engine_t::plug().
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 zmq::reaper_t::in_event(), zmq::io_thread_t::in_event(), and zmq::socket_base_t::process_commands().
void zmq::own_t::process_destroy | ( | ) | [protected, virtual, inherited] |
Reimplemented in zmq::socket_base_t.
Definition at line 215 of file own.cpp.
Referenced by zmq::socket_base_t::check_destroy().
void zmq::object_t::process_hiccup | ( | void * | pipe_ | ) | [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::ipc_connecter_t::process_plug | ( | ) | [private, virtual] |
Reimplemented from zmq::object_t.
Definition at line 68 of file ipc_connecter.cpp.
void zmq::object_t::process_reap | ( | class socket_base_t * | socket_ | ) | [protected, virtual, inherited] |
void zmq::object_t::process_reaped | ( | ) | [protected, virtual, inherited] |
void zmq::object_t::process_stop | ( | ) | [protected, virtual, inherited] |
Reimplemented in zmq::io_thread_t, zmq::reaper_t, and zmq::socket_base_t.
Definition at line 365 of file object.cpp.
References zmq_assert.
void zmq::own_t::process_term | ( | int | linger_ | ) | [protected, virtual, inherited] |
Reimplemented from zmq::object_t.
Reimplemented in zmq::ipc_listener_t, zmq::session_base_t, zmq::socket_base_t, and zmq::tcp_listener_t.
Definition at line 161 of file own.cpp.
References zmq_assert.
Referenced by zmq::session_base_t::proceed_with_term(), zmq::tcp_listener_t::process_term(), zmq::socket_base_t::process_term(), and zmq::ipc_listener_t::process_term().
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::own_t::register_term_acks | ( | int | count_ | ) | [inherited] |
void zmq::io_object_t::reset_pollin | ( | handle_t | handle_ | ) | [protected, inherited] |
Definition at line 70 of file io_object.cpp.
void zmq::io_object_t::reset_pollout | ( | handle_t | handle_ | ) | [protected, inherited] |
Definition at line 80 of file io_object.cpp.
void zmq::io_object_t::rm_fd | ( | handle_t | handle_ | ) | [protected, inherited] |
Definition at line 60 of file io_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.
int zmq::ipc_connecter_t::set_address | ( | const char * | addr_ | ) | [private] |
Definition at line 167 of file ipc_connecter.cpp.
Referenced by ipc_connecter_t().
void zmq::io_object_t::set_pollin | ( | handle_t | handle_ | ) | [protected, inherited] |
Definition at line 65 of file io_object.cpp.
void zmq::io_object_t::set_pollout | ( | handle_t | handle_ | ) | [protected, inherited] |
Definition at line 75 of file io_object.cpp.
void zmq::ipc_connecter_t::start_connecting | ( | ) | [private] |
Definition at line 116 of file ipc_connecter.cpp.
void zmq::ipc_connecter_t::timer_event | ( | int | id_ | ) | [private, virtual] |
Reimplemented from zmq::io_object_t.
Definition at line 109 of file ipc_connecter.cpp.
References zmq_assert.
void zmq::io_object_t::unplug | ( | ) | [inherited] |
Reimplemented in zmq::stream_engine_t.
Definition at line 46 of file io_object.cpp.
References zmq_assert.
Referenced by zmq::stream_engine_t::unplug().
void zmq::object_t::unregister_endpoints | ( | class socket_base_t * | socket_ | ) | [protected, inherited] |
Definition at line 137 of file object.cpp.
void zmq::own_t::unregister_term_ack | ( | ) | [inherited] |
Definition at line 183 of file own.cpp.
References zmq_assert.
ipc_address_t zmq::ipc_connecter_t::address [private] |
Definition at line 88 of file ipc_connecter.hpp.
int zmq::ipc_connecter_t::current_reconnect_ivl [private] |
Definition at line 107 of file ipc_connecter.hpp.
handle_t zmq::ipc_connecter_t::handle [private] |
Definition at line 94 of file ipc_connecter.hpp.
bool zmq::ipc_connecter_t::handle_valid [private] |
Definition at line 98 of file ipc_connecter.hpp.
options_t zmq::own_t::options [protected, inherited] |
Definition at line 98 of file own.hpp.
Referenced by zmq::pair_t::pair_t(), zmq::pub_t::pub_t(), zmq::pull_t::pull_t(), zmq::push_t::push_t(), zmq::rep_t::rep_t(), zmq::req_t::req_t(), zmq::sub_t::sub_t(), zmq::xpub_t::xpub_t(), zmq::xrep_t::xrep_t(), zmq::xreq_t::xreq_t(), and zmq::xsub_t::xsub_t().
fd_t zmq::ipc_connecter_t::s [private] |
Definition at line 91 of file ipc_connecter.hpp.
class session_base_t* zmq::ipc_connecter_t::session [private] |
Definition at line 104 of file ipc_connecter.hpp.
bool zmq::ipc_connecter_t::wait [private] |
Definition at line 101 of file ipc_connecter.hpp.