![]() |
libzmq
master
ZeroMQ C++ Core Engine (LIBZMQ)
|
#include <ipc_connecter.hpp>
Public Member Functions | |
ipc_connecter_t (zmq::io_thread_t *io_thread_, zmq::session_base_t *session_, const options_t &options_, const address_t *addr_, bool delayed_start_) | |
~ipc_connecter_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 () |
![]() | |
object_t (zmq::ctx_t *ctx_, uint32_t tid_) | |
object_t (object_t *parent_) | |
virtual | ~object_t () |
ctx_t * | get_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) |
![]() | |
io_object_t (zmq::io_thread_t *io_thread_=NULL) | |
~io_object_t () | |
void | plug (zmq::io_thread_t *io_thread_) |
void | unplug () |
![]() | |
virtual | ~i_poll_events () |
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 () |
void | process_term (int linger_) |
void | start_connecting () |
void | timer_event (int id_) |
Private Attributes | |
const address_t * | addr |
int | current_reconnect_ivl |
const bool | delayed_start |
std::string | endpoint |
handle_t | handle |
bool | handle_valid |
fd_t | s |
zmq::session_base_t * | session |
zmq::socket_base_t * | socket |
bool | timer_started |
Additional Inherited Members | |
![]() | |
typedef poller_t::handle_t | handle_t |
![]() | |
virtual | ~own_t () |
bool | is_terminating () |
void | launch_child (own_t *object_) |
virtual void | process_destroy () |
void | process_term (int linger_) |
void | term_child (own_t *object_) |
void | terminate () |
![]() | |
zmq::io_thread_t * | choose_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_bind (zmq::pipe_t *pipe_) |
virtual void | process_hiccup (void *pipe_) |
virtual void | process_pipe_term () |
virtual void | process_pipe_term_ack () |
virtual void | process_reap (zmq::socket_base_t *socket_) |
virtual void | process_reaped () |
virtual void | process_stop () |
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_) |
![]() | |
handle_t | add_fd (fd_t fd_) |
void | add_timer (int timout_, int id_) |
void | cancel_timer (int id_) |
void | reset_pollin (handle_t handle_) |
void | reset_pollout (handle_t handle_) |
void | rm_fd (handle_t handle_) |
void | set_pollin (handle_t handle_) |
void | set_pollout (handle_t handle_) |
![]() | |
options_t | options |
Definition at line 49 of file ipc_connecter.hpp.
|
private |
Enumerator | |
---|---|
reconnect_timer_id |
Definition at line 63 of file ipc_connecter.hpp.
zmq::ipc_connecter_t::ipc_connecter_t | ( | zmq::io_thread_t * | io_thread_, |
zmq::session_base_t * | session_, | ||
const options_t & | options_, | ||
const address_t * | addr_, | ||
bool | delayed_start_ | ||
) |
Definition at line 53 of file ipc_connecter.cpp.
References addr, endpoint, zmq::address_t::protocol, session, socket, zmq::address_t::to_string(), and zmq_assert.
zmq::ipc_connecter_t::~ipc_connecter_t | ( | ) |
Definition at line 72 of file ipc_connecter.cpp.
References handle_valid, zmq::retired_fd, s, timer_started, and zmq_assert.
|
private |
|
private |
Definition at line 175 of file ipc_connecter.cpp.
References zmq::io_object_t::add_timer(), endpoint, zmq::socket_base_t::event_connect_retried(), get_new_reconnect_ivl(), reconnect_timer_id, socket, and timer_started.
Referenced by out_event(), process_plug(), and start_connecting().
|
private |
Definition at line 235 of file ipc_connecter.cpp.
References endpoint, errno_assert, zmq::socket_base_t::event_closed(), zmq::retired_fd, s, socket, and zmq_assert.
Referenced by out_event(), process_term(), and start_connecting().
|
private |
Definition at line 245 of file ipc_connecter.cpp.
References ECONNREFUSED, ECONNRESET, EHOSTUNREACH, ENETDOWN, ENETUNREACH, errno_assert, ETIMEDOUT, zmq::retired_fd, and s.
Referenced by open(), and out_event().
|
private |
Definition at line 183 of file ipc_connecter.cpp.
References current_reconnect_ivl, zmq::generate_random(), zmq::own_t::options, zmq::options_t::reconnect_ivl, and zmq::options_t::reconnect_ivl_max.
Referenced by add_reconnect_timer().
|
privatevirtual |
Reimplemented from zmq::io_object_t.
Definition at line 105 of file ipc_connecter.cpp.
References out_event().
|
private |
Definition at line 203 of file ipc_connecter.cpp.
References zmq::ipc_address_t::addr(), addr, zmq::ipc_address_t::addrlen(), connect(), EINPROGRESS, zmq::address_t::ipc_addr, zmq::open_socket(), zmq::address_t::resolved, zmq::retired_fd, s, zmq::unblock_socket(), and zmq_assert.
Referenced by start_connecting().
|
private |
|
privatevirtual |
Reimplemented from zmq::io_object_t.
Definition at line 113 of file ipc_connecter.cpp.
References add_reconnect_timer(), alloc_assert, close(), connect(), endpoint, zmq::socket_base_t::event_connected(), handle, handle_valid, zmq::own_t::options, zmq::retired_fd, zmq::io_object_t::rm_fd(), zmq::object_t::send_attach(), session, socket, and zmq::own_t::terminate().
Referenced by in_event(), and start_connecting().
|
privatevirtual |
Reimplemented from zmq::object_t.
Definition at line 79 of file ipc_connecter.cpp.
References add_reconnect_timer(), delayed_start, and start_connecting().
|
privatevirtual |
Reimplemented from zmq::object_t.
Definition at line 87 of file ipc_connecter.cpp.
References zmq::io_object_t::cancel_timer(), close(), handle, handle_valid, zmq::own_t::process_term(), reconnect_timer_id, zmq::retired_fd, zmq::io_object_t::rm_fd(), s, and timer_started.
|
private |
Definition at line 146 of file ipc_connecter.cpp.
References zmq::io_object_t::add_fd(), add_reconnect_timer(), close(), EINPROGRESS, endpoint, zmq::socket_base_t::event_connect_delayed(), handle, handle_valid, open(), out_event(), zmq::retired_fd, s, zmq::io_object_t::set_pollout(), socket, and zmq_errno().
Referenced by process_plug(), and timer_event().
|
privatevirtual |
Reimplemented from zmq::io_object_t.
Definition at line 139 of file ipc_connecter.cpp.
References reconnect_timer_id, start_connecting(), timer_started, and zmq_assert.
|
private |
Definition at line 98 of file ipc_connecter.hpp.
Referenced by ipc_connecter_t(), and open().
|
private |
Definition at line 120 of file ipc_connecter.hpp.
Referenced by get_new_reconnect_ivl().
|
private |
Definition at line 111 of file ipc_connecter.hpp.
Referenced by process_plug().
|
private |
Definition at line 123 of file ipc_connecter.hpp.
Referenced by add_reconnect_timer(), close(), ipc_connecter_t(), out_event(), and start_connecting().
|
private |
Definition at line 104 of file ipc_connecter.hpp.
Referenced by out_event(), process_term(), and start_connecting().
|
private |
Definition at line 108 of file ipc_connecter.hpp.
Referenced by out_event(), process_term(), start_connecting(), and ~ipc_connecter_t().
|
private |
Definition at line 101 of file ipc_connecter.hpp.
Referenced by close(), connect(), open(), process_term(), start_connecting(), and ~ipc_connecter_t().
|
private |
Definition at line 117 of file ipc_connecter.hpp.
Referenced by ipc_connecter_t(), and out_event().
|
private |
Definition at line 126 of file ipc_connecter.hpp.
Referenced by add_reconnect_timer(), close(), ipc_connecter_t(), out_event(), and start_connecting().
|
private |
Definition at line 114 of file ipc_connecter.hpp.
Referenced by add_reconnect_timer(), process_term(), timer_event(), and ~ipc_connecter_t().