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

#include <own.hpp>

Inheritance diagram for zmq::own_t:
Collaboration diagram for zmq::own_t:

Public Member Functions

 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)
 

Protected Member Functions

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 ()
 
- 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_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_plug ()
 
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_)
 

Protected Attributes

options_t options
 

Private Types

typedef std::set< own_t * > owned_t
 

Private Member Functions

 own_t (const own_t &)
 
void check_term_acks ()
 
const own_toperator= (const own_t &)
 
void process_own (own_t *object_)
 
void process_seqnum ()
 
void process_term_ack ()
 
void process_term_req (own_t *object_)
 
void set_owner (own_t *owner_)
 

Private Attributes

owned_t owned
 
own_towner
 
uint64_t processed_seqnum
 
atomic_counter_t sent_seqnum
 
int term_acks
 
bool terminating
 

Detailed Description

Definition at line 50 of file own.hpp.

Member Typedef Documentation

typedef std::set<own_t*> zmq::own_t::owned_t
private

Definition at line 142 of file own.hpp.

Constructor & Destructor Documentation

zmq::own_t::own_t ( zmq::ctx_t parent_,
uint32_t  tid_ 
)

Definition at line 35 of file own.cpp.

zmq::own_t::own_t ( zmq::io_thread_t io_thread_,
const options_t options_ 
)

Definition at line 45 of file own.cpp.

zmq::own_t::~own_t ( )
protectedvirtual

Definition at line 56 of file own.cpp.

zmq::own_t::own_t ( const own_t )
private

Member Function Documentation

void zmq::own_t::check_term_acks ( )
private

Definition at line 194 of file own.cpp.

References zmq::atomic_counter_t::get(), owned, owner, process_destroy(), processed_seqnum, zmq::object_t::send_term_ack(), sent_seqnum, term_acks, terminating, and zmq_assert.

Referenced by process_seqnum(), process_term(), and unregister_term_ack().

Here is the call graph for this function:

Here is the caller graph for this function:

bool zmq::own_t::is_terminating ( )
protected
void zmq::own_t::launch_child ( own_t object_)
protected

Definition at line 81 of file own.cpp.

References zmq::object_t::send_own(), zmq::object_t::send_plug(), and set_owner().

Referenced by zmq::socket_base_t::add_endpoint(), zmq::tcp_listener_t::in_event(), zmq::ipc_listener_t::in_event(), and zmq::session_base_t::start_connecting().

Here is the call graph for this function:

Here is the caller graph for this function:

const own_t& zmq::own_t::operator= ( const own_t )
private
void zmq::own_t::process_destroy ( )
protectedvirtual

Reimplemented in zmq::socket_base_t.

Definition at line 212 of file own.cpp.

Referenced by zmq::socket_base_t::check_destroy(), and check_term_acks().

Here is the caller graph for this function:

void zmq::own_t::process_own ( own_t object_)
privatevirtual

Reimplemented from zmq::object_t.

Definition at line 121 of file own.cpp.

References owned, register_term_acks(), zmq::object_t::send_term(), and terminating.

Here is the call graph for this function:

void zmq::own_t::process_seqnum ( )
privatevirtual

Reimplemented from zmq::object_t.

Definition at line 72 of file own.cpp.

References check_term_acks(), and processed_seqnum.

Here is the call graph for this function:

void zmq::own_t::process_term_ack ( )
privatevirtual

Reimplemented from zmq::object_t.

Definition at line 189 of file own.cpp.

References unregister_term_ack().

Here is the call graph for this function:

void zmq::own_t::process_term_req ( own_t object_)
privatevirtual

Reimplemented from zmq::object_t.

Definition at line 98 of file own.cpp.

References zmq::options_t::linger, options, owned, register_term_acks(), zmq::object_t::send_term(), and terminating.

Referenced by term_child().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::own_t::register_term_acks ( int  count_)

Definition at line 175 of file own.cpp.

References term_acks.

Referenced by zmq::socket_base_t::attach_pipe(), process_own(), process_term(), zmq::socket_base_t::process_term(), and process_term_req().

Here is the caller graph for this function:

void zmq::own_t::set_owner ( own_t owner_)
private

Definition at line 60 of file own.cpp.

References owner, and zmq_assert.

Referenced by launch_child().

Here is the caller graph for this function:

void zmq::own_t::term_child ( own_t object_)
protected

Definition at line 93 of file own.cpp.

References process_term_req().

Referenced by zmq::socket_base_t::term_endpoint().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::own_t::unregister_term_ack ( )

Definition at line 180 of file own.cpp.

References check_term_acks(), term_acks, and zmq_assert.

Referenced by zmq::socket_base_t::pipe_terminated(), and process_term_ack().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

options_t zmq::own_t::options
protected

Definition at line 109 of file own.hpp.

Referenced by zmq::tcp_listener_t::accept(), zmq::tcp_connecter_t::add_connect_timer(), zmq::socket_base_t::bind(), zmq::socket_base_t::check_protocol(), zmq::socks_connecter_t::check_proxy_connection(), zmq::client_t::client_t(), zmq::ipc_listener_t::close(), zmq::socket_base_t::connect(), zmq::socks_connecter_t::connect_to_proxy(), zmq::dealer_t::dealer_t(), zmq::dish_t::dish_t(), zmq::socket_base_t::extract_flags(), zmq::gather_t::gather_t(), zmq::ipc_connecter_t::get_new_reconnect_ivl(), zmq::tcp_connecter_t::get_new_reconnect_ivl(), zmq::socks_connecter_t::get_new_reconnect_ivl(), zmq::socket_base_t::getsockopt(), zmq::socket_base_t::hiccuped(), zmq::stream_t::identify_peer(), zmq::router_t::identify_peer(), zmq::tcp_listener_t::in_event(), zmq::ipc_listener_t::in_event(), zmq::socks_connecter_t::in_event(), zmq::xsub_t::match(), zmq::tcp_connecter_t::open(), zmq::tcp_connecter_t::out_event(), zmq::ipc_connecter_t::out_event(), zmq::pair_t::pair_t(), zmq::session_base_t::pipe_terminated(), zmq::session_base_t::process_attach(), process_term_req(), zmq::pub_t::pub_t(), zmq::pull_t::pull_t(), zmq::push_t::push_t(), zmq::radio_t::radio_t(), zmq::session_base_t::reconnect(), zmq::socket_base_t::recv(), zmq::rep_t::rep_t(), zmq::req_t::req_t(), zmq::router_t::router_t(), zmq::scatter_t::scatter_t(), zmq::socket_base_t::send(), zmq::server_t::server_t(), zmq::tcp_listener_t::set_address(), zmq::ipc_listener_t::set_address(), zmq::socket_base_t::setsockopt(), zmq::socket_base_t::socket_base_t(), zmq::session_base_t::start_connecting(), zmq::stream_t::stream_t(), zmq::sub_t::sub_t(), zmq::socket_base_t::term_endpoint(), terminate(), zmq::socket_base_t::update_pipe_options(), zmq::xsub_t::xhas_in(), zmq::xpub_t::xpub_t(), zmq::xpub_t::xread_activated(), zmq::xsub_t::xrecv(), zmq::xpub_t::xsend(), zmq::router_t::xsend(), zmq::router_t::xsetsockopt(), zmq::stream_t::xsetsockopt(), zmq::xsub_t::xsub_t(), and zmq::session_base_t::zap_enabled().

owned_t zmq::own_t::owned
private

Definition at line 143 of file own.hpp.

Referenced by check_term_acks(), process_own(), process_term(), and process_term_req().

own_t* zmq::own_t::owner
private

Definition at line 138 of file own.hpp.

Referenced by check_term_acks(), set_owner(), and terminate().

uint64_t zmq::own_t::processed_seqnum
private

Definition at line 134 of file own.hpp.

Referenced by check_term_acks(), and process_seqnum().

atomic_counter_t zmq::own_t::sent_seqnum
private

Definition at line 131 of file own.hpp.

Referenced by check_term_acks(), and inc_seqnum().

int zmq::own_t::term_acks
private

Definition at line 146 of file own.hpp.

Referenced by check_term_acks(), register_term_acks(), and unregister_term_ack().

bool zmq::own_t::terminating
private