![]() |
libzmq
master
ZeroMQ C++ Core Engine (LIBZMQ)
|
#include <pipe.hpp>
Public Member Functions | |
bool | check_hwm () const |
bool | check_read () |
bool | check_write () |
void | flush () |
blob_t | get_credential () const |
blob_t | get_identity () |
uint32_t | get_routing_id () |
void | hiccup () |
bool | read (msg_t *msg_) |
void | rollback () |
void | set_event_sink (i_pipe_events *sink_) |
void | set_hwms (int inhwm_, int outhwm_) |
void | set_hwms_boost (int inhwmboost_, int outhwmboost_) |
void | set_identity (const blob_t &identity_) |
void | set_nodelay () |
void | set_routing_id (uint32_t routing_id_) |
void | terminate (bool delay_) |
bool | write (msg_t *msg_) |
![]() | |
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) |
![]() | |
array_item_t () | |
virtual | ~array_item_t () |
int | get_array_index () |
void | set_array_index (int index_) |
![]() | |
array_item_t () | |
virtual | ~array_item_t () |
int | get_array_index () |
void | set_array_index (int index_) |
![]() | |
array_item_t () | |
virtual | ~array_item_t () |
int | get_array_index () |
void | set_array_index (int index_) |
Private Types | |
enum | { active, delimiter_received, waiting_for_delimiter, term_ack_sent, term_req_sent1, term_req_sent2 } |
typedef ypipe_base_t< msg_t > | upipe_t |
Private Member Functions | |
pipe_t (object_t *parent_, upipe_t *inpipe_, upipe_t *outpipe_, int inhwm_, int outhwm_, bool conflate_) | |
pipe_t (const pipe_t &) | |
~pipe_t () | |
const pipe_t & | operator= (const pipe_t &) |
void | process_activate_read () |
void | process_activate_write (uint64_t msgs_read_) |
void | process_delimiter () |
void | process_hiccup (void *pipe_) |
void | process_pipe_term () |
void | process_pipe_term_ack () |
void | set_peer (pipe_t *pipe_) |
Static Private Member Functions | |
static int | compute_lwm (int hwm_) |
static bool | is_delimiter (const msg_t &msg_) |
Private Attributes | |
const bool | conflate |
blob_t | credential |
bool | delay |
int | hwm |
blob_t | identity |
bool | in_active |
int | inhwmboost |
upipe_t * | inpipe |
int | lwm |
uint64_t | msgs_read |
uint64_t | msgs_written |
bool | out_active |
int | outhwmboost |
upipe_t * | outpipe |
pipe_t * | peer |
uint64_t | peers_msgs_read |
int | routing_id |
i_pipe_events * | sink |
enum zmq::pipe_t:: { ... } | state |
Friends | |
int | pipepair (zmq::object_t *parents_[2], zmq::pipe_t *pipes_[2], int hwms_[2], bool conflate_[2]) |
Additional Inherited Members | |
![]() | |
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_attach (zmq::i_engine *engine_) |
virtual void | process_bind (zmq::pipe_t *pipe_) |
virtual void | process_own (zmq::own_t *object_) |
virtual void | process_plug () |
virtual void | process_reap (zmq::socket_base_t *socket_) |
virtual void | process_reaped () |
virtual void | process_seqnum () |
virtual void | process_stop () |
virtual void | process_term (int linger_) |
virtual void | process_term_ack () |
virtual void | process_term_req (zmq::own_t *object_) |
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 |
|
private |
|
private |
bool zmq::pipe_t::check_hwm | ( | ) | const |
Definition at line 531 of file pipe.cpp.
References hwm, msgs_written, and peers_msgs_read.
Referenced by check_write().
bool zmq::pipe_t::check_read | ( | ) |
Definition at line 143 of file pipe.cpp.
References active, zmq::ypipe_base_t< T >::check_read(), in_active, inpipe, is_delimiter(), zmq::ypipe_base_t< T >::probe(), process_delimiter(), zmq::ypipe_base_t< T >::read(), state, unlikely, waiting_for_delimiter, and zmq_assert.
Referenced by zmq::session_base_t::engine_error(), zmq::session_base_t::process_term(), zmq::session_base_t::read_activated(), and zmq::pair_t::xhas_in().
bool zmq::pipe_t::check_write | ( | ) |
Definition at line 206 of file pipe.cpp.
References active, check_hwm(), out_active, state, and unlikely.
Referenced by write(), zmq::pair_t::xhas_out(), zmq::stream_t::xsend(), and zmq::router_t::xsend().
Definition at line 449 of file pipe.cpp.
Referenced by set_hwms().
void zmq::pipe_t::flush | ( | ) |
Definition at line 248 of file pipe.cpp.
References zmq::ypipe_base_t< T >::flush(), outpipe, peer, zmq::object_t::send_activate_read(), state, and term_ack_sent.
Referenced by zmq::session_base_t::clean_pipes(), zmq::socket_base_t::connect(), zmq::ctx_t::connect_inproc_sockets(), zmq::session_base_t::flush(), zmq::dish_t::send_subscriptions(), terminate(), zmq::dist_t::write(), zmq::session_base_t::write_zap_msg(), zmq::xsub_t::xattach_pipe(), zmq::dealer_t::xattach_pipe(), zmq::router_t::xattach_pipe(), zmq::xpub_t::xattach_pipe(), zmq::xsub_t::xhiccuped(), zmq::stream_t::xsend(), zmq::pair_t::xsend(), zmq::router_t::xsend(), and zmq::session_base_t::zap_connect().
zmq::blob_t zmq::pipe_t::get_credential | ( | ) | const |
Definition at line 138 of file pipe.cpp.
References credential.
Referenced by zmq::fq_t::get_credential(), zmq::pair_t::get_credential(), zmq::fq_t::pipe_terminated(), and zmq::pair_t::xpipe_terminated().
zmq::blob_t zmq::pipe_t::get_identity | ( | ) |
Definition at line 133 of file pipe.cpp.
References identity.
Referenced by zmq::stream_t::xhas_in(), zmq::router_t::xhas_in(), zmq::stream_t::xpipe_terminated(), zmq::router_t::xpipe_terminated(), zmq::stream_t::xrecv(), and zmq::router_t::xrecv().
uint32_t zmq::pipe_t::get_routing_id | ( | ) |
Definition at line 123 of file pipe.cpp.
References routing_id.
Referenced by zmq::server_t::xpipe_terminated(), and zmq::server_t::xrecv().
void zmq::pipe_t::hiccup | ( | ) |
Definition at line 486 of file pipe.cpp.
References active, alloc_assert, conflate, in_active, inpipe, peer, zmq::object_t::send_hiccup(), and state.
Referenced by zmq::session_base_t::reconnect().
Definition at line 444 of file pipe.cpp.
References zmq::msg_t::is_delimiter().
Referenced by check_read().
|
privatevirtual |
Reimplemented from zmq::object_t.
Definition at line 258 of file pipe.cpp.
References active, in_active, zmq::i_pipe_events::read_activated(), sink, state, and waiting_for_delimiter.
|
privatevirtual |
Reimplemented from zmq::object_t.
Definition at line 266 of file pipe.cpp.
References active, out_active, peers_msgs_read, sink, state, and zmq::i_pipe_events::write_activated().
|
private |
Definition at line 472 of file pipe.cpp.
References active, delimiter_received, outpipe, peer, zmq::object_t::send_pipe_term_ack(), state, term_ack_sent, waiting_for_delimiter, and zmq_assert.
Referenced by check_read(), and read().
|
privatevirtual |
Reimplemented from zmq::object_t.
Definition at line 277 of file pipe.cpp.
References active, zmq::msg_t::close(), errno_assert, zmq::msg_t::flags, zmq::ypipe_base_t< T >::flush(), zmq::i_pipe_events::hiccuped(), LIBZMQ_DELETE, zmq::msg_t::more, msgs_written, out_active, outpipe, zmq::ypipe_base_t< T >::read(), sink, state, and zmq_assert.
|
privatevirtual |
Reimplemented from zmq::object_t.
Definition at line 302 of file pipe.cpp.
References active, delay, delimiter_received, outpipe, peer, zmq::object_t::send_pipe_term_ack(), state, term_ack_sent, term_req_sent1, term_req_sent2, waiting_for_delimiter, and zmq_assert.
|
privatevirtual |
Reimplemented from zmq::object_t.
Definition at line 343 of file pipe.cpp.
References zmq::msg_t::close(), conflate, errno_assert, inpipe, LIBZMQ_DELETE, outpipe, peer, zmq::i_pipe_events::pipe_terminated(), zmq::ypipe_base_t< T >::read(), zmq::object_t::send_pipe_term_ack(), sink, state, term_ack_sent, term_req_sent1, term_req_sent2, and zmq_assert.
Definition at line 169 of file pipe.cpp.
References active, zmq::msg_t::close(), credential, zmq::msg_t::data, zmq::msg_t::flags, in_active, inpipe, zmq::msg_t::is_credential(), zmq::msg_t::is_delimiter(), zmq::msg_t::is_identity(), lwm, zmq::msg_t::more, msgs_read, peer, process_delimiter(), zmq::ypipe_base_t< T >::read(), zmq::object_t::send_activate_write(), zmq::msg_t::size, state, unlikely, waiting_for_delimiter, and zmq_assert.
Referenced by zmq::ctx_t::connect_inproc_sockets(), zmq::router_t::identify_peer(), zmq::session_base_t::pull_msg(), zmq::session_base_t::read_zap_msg(), zmq::xpub_t::xread_activated(), zmq::radio_t::xread_activated(), and zmq::pair_t::xrecv().
void zmq::pipe_t::rollback | ( | ) |
Definition at line 235 of file pipe.cpp.
References zmq::msg_t::close(), errno_assert, zmq::msg_t::flags, zmq::msg_t::more, outpipe, zmq::ypipe_base_t< T >::unwrite(), and zmq_assert.
Referenced by zmq::session_base_t::clean_pipes(), zmq::router_t::rollback(), and terminate().
void zmq::pipe_t::set_event_sink | ( | i_pipe_events * | sink_ | ) |
Definition at line 111 of file pipe.cpp.
References sink, and zmq_assert.
Referenced by zmq::session_base_t::attach_pipe(), zmq::socket_base_t::attach_pipe(), zmq::session_base_t::process_attach(), and zmq::session_base_t::zap_connect().
Definition at line 509 of file pipe.cpp.
References compute_lwm(), hwm, inhwmboost, lwm, and outhwmboost.
Referenced by zmq::ctx_t::connect_inproc_sockets().
Definition at line 525 of file pipe.cpp.
References inhwmboost, and outhwmboost.
Referenced by zmq::socket_base_t::connect(), and zmq::ctx_t::connect_inproc_sockets().
void zmq::pipe_t::set_identity | ( | const blob_t & | identity_ | ) |
Definition at line 128 of file pipe.cpp.
References identity.
Referenced by zmq::stream_t::identify_peer(), and zmq::router_t::identify_peer().
void zmq::pipe_t::set_nodelay | ( | ) |
Definition at line 380 of file pipe.cpp.
References delay.
Referenced by zmq::pub_t::xattach_pipe(), zmq::push_t::xattach_pipe(), zmq::scatter_t::xattach_pipe(), zmq::radio_t::xattach_pipe(), and zmq::session_base_t::zap_connect().
|
private |
Definition at line 104 of file pipe.cpp.
References peer, and zmq_assert.
Referenced by zmq::pipepair().
void zmq::pipe_t::set_routing_id | ( | uint32_t | routing_id_ | ) |
Definition at line 118 of file pipe.cpp.
References routing_id.
Referenced by zmq::server_t::xattach_pipe().
void zmq::pipe_t::terminate | ( | bool | delay_ | ) |
Definition at line 385 of file pipe.cpp.
References active, delay, delimiter_received, flush(), zmq::msg_t::init_delimiter(), out_active, outpipe, peer, rollback(), zmq::object_t::send_pipe_term(), zmq::object_t::send_pipe_term_ack(), state, term_ack_sent, term_req_sent1, term_req_sent2, waiting_for_delimiter, zmq::ypipe_base_t< T >::write(), and zmq_assert.
Referenced by zmq::socket_base_t::attach_pipe(), zmq::socket_base_t::hiccuped(), zmq::router_t::identify_peer(), zmq::session_base_t::process_term(), zmq::session_base_t::reconnect(), zmq::session_base_t::timer_event(), zmq::pair_t::xattach_pipe(), zmq::router_t::xrecv(), zmq::stream_t::xsend(), and zmq::router_t::xsend().
Definition at line 221 of file pipe.cpp.
References check_write(), zmq::msg_t::flags, zmq::msg_t::is_identity(), zmq::msg_t::more, msgs_written, outpipe, unlikely, and zmq::ypipe_base_t< T >::write().
Referenced by zmq::socket_base_t::connect(), zmq::ctx_t::connect_inproc_sockets(), zmq::session_base_t::push_msg(), zmq::xsub_t::send_subscription(), zmq::dish_t::send_subscriptions(), zmq::dist_t::write(), zmq::session_base_t::write_zap_msg(), zmq::dealer_t::xattach_pipe(), zmq::router_t::xattach_pipe(), zmq::xpub_t::xattach_pipe(), zmq::stream_t::xsend(), zmq::pair_t::xsend(), zmq::router_t::xsend(), and zmq::session_base_t::zap_connect().
|
friend |
|
private |
Definition at line 240 of file pipe.hpp.
Referenced by hiccup(), and process_pipe_term_ack().
|
private |
Definition at line 232 of file pipe.hpp.
Referenced by get_credential(), and read().
|
private |
Definition at line 223 of file pipe.hpp.
Referenced by process_pipe_term(), set_nodelay(), and terminate().
|
private |
Definition at line 177 of file pipe.hpp.
Referenced by check_hwm(), and set_hwms().
|
private |
Definition at line 226 of file pipe.hpp.
Referenced by get_identity(), and set_identity().
|
private |
Definition at line 173 of file pipe.hpp.
Referenced by check_read(), hiccup(), process_activate_read(), and read().
|
private |
Definition at line 183 of file pipe.hpp.
Referenced by set_hwms(), and set_hwms_boost().
|
private |
Definition at line 169 of file pipe.hpp.
Referenced by check_read(), hiccup(), process_pipe_term_ack(), and read().
|
private |
Definition at line 180 of file pipe.hpp.
Referenced by read(), and set_hwms().
|
private |
|
private |
Definition at line 188 of file pipe.hpp.
Referenced by check_hwm(), process_hiccup(), and write().
|
private |
Definition at line 174 of file pipe.hpp.
Referenced by check_write(), process_activate_write(), process_hiccup(), and terminate().
|
private |
Definition at line 184 of file pipe.hpp.
Referenced by set_hwms(), and set_hwms_boost().
|
private |
Definition at line 170 of file pipe.hpp.
Referenced by flush(), process_delimiter(), process_hiccup(), process_pipe_term(), process_pipe_term_ack(), rollback(), terminate(), and write().
|
private |
Definition at line 195 of file pipe.hpp.
Referenced by flush(), hiccup(), process_delimiter(), process_pipe_term(), process_pipe_term_ack(), read(), set_peer(), and terminate().
|
private |
Definition at line 192 of file pipe.hpp.
Referenced by check_hwm(), and process_activate_write().
|
private |
Definition at line 229 of file pipe.hpp.
Referenced by get_routing_id(), and set_routing_id().
|
private |
Definition at line 198 of file pipe.hpp.
Referenced by process_activate_read(), process_activate_write(), process_hiccup(), process_pipe_term_ack(), and set_event_sink().
enum { ... } zmq::pipe_t::state |