![]() |
libzmq
master
ZeroMQ C++ Core Engine (LIBZMQ)
|
#include <socket_base.hpp>
Public Member Functions | |
int | add_signaler (signaler_t *s) |
int | bind (const char *addr_) |
bool | check_tag () |
int | close () |
int | connect (const char *addr_) |
void | event_accept_failed (const std::string &addr_, int err_) |
void | event_accepted (const std::string &addr_, int fd_) |
void | event_bind_failed (const std::string &addr_, int err_) |
void | event_close_failed (const std::string &addr_, int fd_) |
void | event_closed (const std::string &addr_, int fd_) |
void | event_connect_delayed (const std::string &addr_, int err_) |
void | event_connect_retried (const std::string &addr_, int interval_) |
void | event_connected (const std::string &addr_, int fd_) |
void | event_disconnected (const std::string &addr_, int fd_) |
void | event_listening (const std::string &addr_, int fd_) |
i_mailbox * | get_mailbox () |
int | getsockopt (int option_, void *optval_, size_t *optvallen_) |
bool | has_in () |
bool | has_out () |
void | hiccuped (pipe_t *pipe_) |
void | in_event () |
int | join (const char *group) |
int | leave (const char *group) |
void | lock () |
int | monitor (const char *endpoint_, int events_) |
void | out_event () |
void | pipe_terminated (pipe_t *pipe_) |
void | read_activated (pipe_t *pipe_) |
int | recv (zmq::msg_t *msg_, int flags_) |
int | remove_signaler (signaler_t *s) |
int | send (zmq::msg_t *msg_, int flags_) |
int | setsockopt (int option_, const void *optval_, size_t optvallen_) |
void | start_reaping (poller_t *poller_) |
void | stop () |
int | term_endpoint (const char *addr_) |
void | timer_event (int id_) |
void | unlock () |
void | write_activated (pipe_t *pipe_) |
![]() | |
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) |
![]() | |
array_item_t () | |
virtual | ~array_item_t () |
int | get_array_index () |
void | set_array_index (int index_) |
![]() | |
virtual | ~i_poll_events () |
![]() | |
virtual | ~i_pipe_events () |
Static Public Member Functions | |
static socket_base_t * | create (int type_, zmq::ctx_t *parent_, uint32_t tid_, int sid_) |
Protected Member Functions | |
socket_base_t (zmq::ctx_t *parent_, uint32_t tid_, int sid_, bool thread_safe_=false) | |
virtual | ~socket_base_t () |
virtual blob_t | get_credential () const |
void | monitor_event (int event_, int value_, const std::string &addr_) |
void | process_destroy () |
void | stop_monitor (bool send_monitor_stopped_event_=true) |
virtual void | xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_=false)=0 |
virtual bool | xhas_in () |
virtual bool | xhas_out () |
virtual void | xhiccuped (pipe_t *pipe_) |
virtual int | xjoin (const char *group_) |
virtual int | xleave (const char *group_) |
virtual void | xpipe_terminated (pipe_t *pipe_)=0 |
virtual void | xread_activated (pipe_t *pipe_) |
virtual int | xrecv (zmq::msg_t *msg_) |
virtual int | xsend (zmq::msg_t *msg_) |
virtual int | xsetsockopt (int option_, const void *optval_, size_t optvallen_) |
virtual void | xwrite_activated (pipe_t *pipe_) |
![]() | |
virtual | ~own_t () |
bool | is_terminating () |
void | launch_child (own_t *object_) |
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_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 () |
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 | |
std::string | connect_rid |
![]() | |
options_t | options |
Private Types | |
typedef std::pair< own_t *, pipe_t * > | endpoint_pipe_t |
typedef std::multimap< std::string, endpoint_pipe_t > | endpoints_t |
typedef std::multimap< std::string, pipe_t * > | inprocs_t |
typedef array_t< pipe_t, 3 > | pipes_t |
Private Member Functions | |
socket_base_t (const socket_base_t &) | |
void | add_endpoint (const char *addr_, own_t *endpoint_, pipe_t *pipe) |
void | attach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_=false) |
void | check_destroy () |
int | check_protocol (const std::string &protocol_) |
void | extract_flags (msg_t *msg_) |
const socket_base_t & | operator= (const socket_base_t &) |
int | parse_uri (const char *uri_, std::string &protocol_, std::string &address_) |
void | process_bind (zmq::pipe_t *pipe_) |
int | process_commands (int timeout_, bool throttle_) |
void | process_stop () |
void | process_term (int linger_) |
void | update_pipe_options (int option_) |
Private Attributes | |
clock_t | clock |
bool | ctx_terminated |
bool | destroyed |
endpoints_t | endpoints |
poller_t::handle_t | handle |
inprocs_t | inprocs |
std::string | last_endpoint |
uint64_t | last_tsc |
i_mailbox * | mailbox |
int | monitor_events |
void * | monitor_socket |
pipes_t | pipes |
poller_t * | poller |
bool | rcvmore |
signaler_t * | reaper_signaler |
mutex_t | sync |
uint32_t | tag |
bool | thread_safe |
int | ticks |
Friends | |
class | reaper_t |
Definition at line 61 of file socket_base.hpp.
|
private |
Definition at line 193 of file socket_base.hpp.
|
private |
Definition at line 194 of file socket_base.hpp.
|
private |
Definition at line 198 of file socket_base.hpp.
|
private |
Definition at line 248 of file socket_base.hpp.
|
protected |
Definition at line 190 of file socket_base.cpp.
References zmq::ctx_t::get(), zmq::mailbox_t::get_fd(), zmq::options_t::ipv6, LIBZMQ_DELETE, zmq::options_t::linger, mailbox, zmq::own_t::options, zmq::retired_fd, zmq::options_t::socket_id, sync, thread_safe, ZMQ_BLOCKY, and ZMQ_IPV6.
|
protectedvirtual |
Definition at line 222 of file socket_base.cpp.
References destroyed, LIBZMQ_DELETE, mailbox, reaper_signaler, stop_monitor(), and zmq_assert.
|
private |
|
private |
Definition at line 978 of file socket_base.cpp.
References endpoints, and zmq::own_t::launch_child().
Referenced by bind(), and connect().
int zmq::socket_base_t::add_signaler | ( | signaler_t * | s | ) |
Definition at line 488 of file socket_base.cpp.
References ENTER_MUTEX, EXIT_MUTEX, mailbox, and thread_safe.
Referenced by zmq::socket_poller_t::add().
|
private |
Definition at line 319 of file socket_base.cpp.
References zmq::own_t::is_terminating(), pipes, zmq::array_t< T, ID >::push_back(), zmq::own_t::register_term_acks(), zmq::pipe_t::set_event_sink(), zmq::pipe_t::terminate(), and xattach_pipe().
Referenced by connect(), and process_bind().
int zmq::socket_base_t::bind | ( | const char * | addr_ | ) |
Definition at line 520 of file socket_base.cpp.
References add_endpoint(), address, zmq::options_t::affinity, alloc_assert, check_protocol(), zmq::object_t::choose_io_thread(), connect(), zmq::object_t::connect_pending(), zmq::options_t::connected, ctx_terminated, EMTHREAD, ENTER_MUTEX, ETERM, event_bind_failed(), EXIT_MUTEX, zmq::tcp_listener_t::get_address(), zmq::ipc_listener_t::get_address(), last_endpoint, LIBZMQ_DELETE, zmq::own_t::options, parse_uri(), process_commands(), zmq::object_t::register_endpoint(), zmq::tcp_listener_t::set_address(), zmq::ipc_listener_t::set_address(), unlikely, zmq_assert, and zmq_errno().
Referenced by zmq::ctx_t::terminate(), and zmq_bind().
|
private |
Definition at line 1538 of file socket_base.cpp.
References zmq::object_t::destroy_socket(), destroyed, handle, poller, zmq::own_t::process_destroy(), and zmq::object_t::send_reaped().
Referenced by in_event(), and start_reaping().
|
private |
Definition at line 269 of file socket_base.cpp.
References ENOCOMPATPROTO, EPROTONOSUPPORT, zmq::own_t::options, zmq::options_t::type, ZMQ_DISH, ZMQ_PUB, ZMQ_RADIO, ZMQ_SUB, ZMQ_XPUB, and ZMQ_XSUB.
Referenced by bind(), connect(), monitor(), and term_endpoint().
bool zmq::socket_base_t::check_tag | ( | ) |
Definition at line 110 of file socket_base.cpp.
References tag.
int zmq::socket_base_t::close | ( | ) |
Definition at line 1282 of file socket_base.cpp.
References ENTER_MUTEX, EXIT_MUTEX, mailbox, zmq::object_t::send_reap(), tag, and thread_safe.
Referenced by zmq::ctx_t::terminate().
int zmq::socket_base_t::connect | ( | const char * | addr_ | ) |
Definition at line 668 of file socket_base.cpp.
References add_endpoint(), address, zmq::options_t::affinity, alloc_assert, zmq::session_base_t::attach_pipe(), attach_pipe(), check_protocol(), zmq::object_t::choose_io_thread(), zmq::options_t::conflate, zmq::options_t::connected, zmq::session_base_t::create(), ctx_terminated, EMTHREAD, endpoints, ENTER_MUTEX, errno_assert, ETERM, EXIT_MUTEX, zmq::object_t::find_endpoint(), zmq::pipe_t::flush(), zmq::object_t::get_ctx(), zmq::options_t::identity, zmq::msg_t::identity, zmq::options_t::identity_size, zmq::options_t::immediate, inprocs, zmq::address_t::ipc_addr, last_endpoint, LIBZMQ_DELETE, zmq::endpoint_t::options, zmq::own_t::options, parse_uri(), zmq::object_t::pend_connection(), zmq::pipepair(), process_commands(), zmq::options_t::rcvhwm, zmq::options_t::recv_identity, zmq::udp_address_t::resolve(), zmq::ipc_address_t::resolve(), zmq::address_t::resolved, zmq::object_t::send_bind(), zmq::pipe_t::set_hwms_boost(), zmq::options_t::sndhwm, zmq::endpoint_t::socket, zmq::address_t::tcp_addr, zmq::address_t::to_string(), zmq::options_t::type, zmq::address_t::udp_addr, unlikely, zmq::pipe_t::write(), zmq_assert, ZMQ_DEALER, ZMQ_DISH, ZMQ_PUB, ZMQ_PULL, ZMQ_PUSH, ZMQ_REQ, and ZMQ_SUB.
Referenced by bind(), and zmq_connect().
|
static |
Definition at line 115 of file socket_base.cpp.
References alloc_assert, destroyed, LIBZMQ_DELETE, mailbox, ZMQ_CLIENT, ZMQ_DEALER, ZMQ_DISH, ZMQ_GATHER, ZMQ_PAIR, ZMQ_PUB, ZMQ_PULL, ZMQ_PUSH, ZMQ_RADIO, ZMQ_REP, ZMQ_REQ, ZMQ_ROUTER, ZMQ_SCATTER, ZMQ_SERVER, ZMQ_STREAM, ZMQ_SUB, ZMQ_XPUB, and ZMQ_XSUB.
Referenced by zmq::ctx_t::create_socket().
void zmq::socket_base_t::event_accept_failed | ( | const std::string & | addr_, |
int | err_ | ||
) |
Definition at line 1686 of file socket_base.cpp.
References monitor_event(), monitor_events, and ZMQ_EVENT_ACCEPT_FAILED.
Referenced by zmq::tcp_listener_t::in_event(), and zmq::ipc_listener_t::in_event().
void zmq::socket_base_t::event_accepted | ( | const std::string & | addr_, |
int | fd_ | ||
) |
Definition at line 1680 of file socket_base.cpp.
References monitor_event(), monitor_events, and ZMQ_EVENT_ACCEPTED.
Referenced by zmq::tcp_listener_t::in_event(), and zmq::ipc_listener_t::in_event().
void zmq::socket_base_t::event_bind_failed | ( | const std::string & | addr_, |
int | err_ | ||
) |
Definition at line 1674 of file socket_base.cpp.
References monitor_event(), monitor_events, and ZMQ_EVENT_BIND_FAILED.
Referenced by bind().
void zmq::socket_base_t::event_close_failed | ( | const std::string & | addr_, |
int | fd_ | ||
) |
Definition at line 1698 of file socket_base.cpp.
References monitor_event(), monitor_events, and ZMQ_EVENT_CLOSE_FAILED.
Referenced by zmq::ipc_listener_t::close().
void zmq::socket_base_t::event_closed | ( | const std::string & | addr_, |
int | fd_ | ||
) |
Definition at line 1692 of file socket_base.cpp.
References monitor_event(), monitor_events, and ZMQ_EVENT_CLOSED.
Referenced by zmq::tcp_listener_t::close(), zmq::ipc_listener_t::close(), zmq::tcp_connecter_t::close(), zmq::ipc_connecter_t::close(), and zmq::socks_connecter_t::close().
void zmq::socket_base_t::event_connect_delayed | ( | const std::string & | addr_, |
int | err_ | ||
) |
Definition at line 1656 of file socket_base.cpp.
References monitor_event(), monitor_events, and ZMQ_EVENT_CONNECT_DELAYED.
Referenced by zmq::socks_connecter_t::initiate_connect(), zmq::tcp_connecter_t::start_connecting(), and zmq::ipc_connecter_t::start_connecting().
void zmq::socket_base_t::event_connect_retried | ( | const std::string & | addr_, |
int | interval_ | ||
) |
Definition at line 1662 of file socket_base.cpp.
References monitor_event(), monitor_events, and ZMQ_EVENT_CONNECT_RETRIED.
Referenced by zmq::ipc_connecter_t::add_reconnect_timer(), zmq::tcp_connecter_t::add_reconnect_timer(), and zmq::socks_connecter_t::start_timer().
void zmq::socket_base_t::event_connected | ( | const std::string & | addr_, |
int | fd_ | ||
) |
Definition at line 1650 of file socket_base.cpp.
References monitor_event(), monitor_events, and ZMQ_EVENT_CONNECTED.
Referenced by zmq::socks_connecter_t::in_event(), zmq::tcp_connecter_t::out_event(), and zmq::ipc_connecter_t::out_event().
void zmq::socket_base_t::event_disconnected | ( | const std::string & | addr_, |
int | fd_ | ||
) |
Definition at line 1704 of file socket_base.cpp.
References monitor_event(), monitor_events, and ZMQ_EVENT_DISCONNECTED.
Referenced by zmq::stream_engine_t::error().
void zmq::socket_base_t::event_listening | ( | const std::string & | addr_, |
int | fd_ | ||
) |
Definition at line 1668 of file socket_base.cpp.
References monitor_event(), monitor_events, and ZMQ_EVENT_LISTENING.
Referenced by zmq::tcp_listener_t::set_address(), and zmq::ipc_listener_t::set_address().
|
private |
Definition at line 1595 of file socket_base.cpp.
References zmq::msg_t::flags, zmq::msg_t::identity, zmq::msg_t::more, zmq::own_t::options, rcvmore, zmq::options_t::recv_identity, unlikely, and zmq_assert.
Referenced by recv().
|
protectedvirtual |
Reimplemented in zmq::router_t, zmq::server_t, zmq::dish_t, zmq::dealer_t, zmq::client_t, zmq::xsub_t, zmq::gather_t, zmq::pair_t, and zmq::pull_t.
Definition at line 1492 of file socket_base.cpp.
zmq::i_mailbox * zmq::socket_base_t::get_mailbox | ( | ) |
Definition at line 234 of file socket_base.cpp.
References mailbox.
Referenced by zmq::ctx_t::create_socket().
Definition at line 369 of file socket_base.cpp.
References ctx_terminated, ENTER_MUTEX, errno_assert, ETERM, EXIT_MUTEX, zmq::options_t::getsockopt(), has_in(), has_out(), last_endpoint, mailbox, zmq::own_t::options, process_commands(), rcvmore, thread_safe, unlikely, ZMQ_EVENTS, ZMQ_FD, ZMQ_LAST_ENDPOINT, ZMQ_POLLIN, ZMQ_POLLOUT, ZMQ_RCVMORE, and ZMQ_THREAD_SAFE.
Referenced by zmq::socket_poller_t::add(), forward(), zmq::proxy(), zmq::socket_poller_t::remove(), and zmq_getsockopt().
bool zmq::socket_base_t::has_in | ( | ) |
Definition at line 1303 of file socket_base.cpp.
References xhas_in().
Referenced by getsockopt().
bool zmq::socket_base_t::has_out | ( | ) |
Definition at line 1308 of file socket_base.cpp.
References xhas_out().
Referenced by getsockopt().
|
virtual |
Implements zmq::i_pipe_events.
Definition at line 1567 of file socket_base.cpp.
References zmq::options_t::immediate, zmq::own_t::options, zmq::pipe_t::terminate(), and xhiccuped().
|
virtual |
Implements zmq::i_poll_events.
Definition at line 1511 of file socket_base.cpp.
References check_destroy(), ENTER_MUTEX, EXIT_MUTEX, process_commands(), reaper_signaler, zmq::signaler_t::recv(), and thread_safe.
int zmq::socket_base_t::join | ( | const char * | group | ) |
Definition at line 466 of file socket_base.cpp.
References ENTER_MUTEX, EXIT_MUTEX, and xjoin().
Referenced by zmq_join().
int zmq::socket_base_t::leave | ( | const char * | group | ) |
Definition at line 477 of file socket_base.cpp.
References ENTER_MUTEX, EXIT_MUTEX, and xleave().
Referenced by zmq_leave().
void zmq::socket_base_t::lock | ( | ) |
Definition at line 1605 of file socket_base.cpp.
References address, check_protocol(), ctx_terminated, EPROTONOSUPPORT, ETERM, zmq::object_t::get_ctx(), monitor_events, monitor_socket, parse_uri(), stop_monitor(), unlikely, zmq_bind(), ZMQ_LINGER, ZMQ_PAIR, zmq_setsockopt(), and zmq_socket().
Referenced by zmq_socket_monitor().
|
protected |
Definition at line 1711 of file socket_base.cpp.
References monitor_socket, zmq_msg_data(), zmq_msg_init_size(), zmq_sendmsg(), and ZMQ_SNDMORE.
Referenced by event_accept_failed(), event_accepted(), event_bind_failed(), event_close_failed(), event_closed(), event_connect_delayed(), event_connect_retried(), event_connected(), event_disconnected(), event_listening(), and stop_monitor().
|
private |
|
virtual |
Implements zmq::i_poll_events.
Definition at line 1528 of file socket_base.cpp.
References zmq_assert.
|
private |
Definition at line 248 of file socket_base.cpp.
References zmq_assert.
Referenced by bind(), connect(), monitor(), and term_endpoint().
|
virtual |
Implements zmq::i_pipe_events.
Definition at line 1576 of file socket_base.cpp.
References zmq::array_t< T, ID >::erase(), inprocs, zmq::own_t::is_terminating(), pipes, zmq::own_t::unregister_term_ack(), and xpipe_terminated().
|
privatevirtual |
Reimplemented from zmq::object_t.
Definition at line 1412 of file socket_base.cpp.
References attach_pipe().
Definition at line 1346 of file socket_base.cpp.
References ctx_terminated, zmq::command_t::destination, ETERM, last_tsc, mailbox, zmq::max_command_delay, zmq::object_t::process_command(), zmq::clock_t::rdtsc(), zmq::i_mailbox::recv(), and zmq_assert.
Referenced by bind(), connect(), getsockopt(), in_event(), recv(), send(), and term_endpoint().
|
protectedvirtual |
Reimplemented from zmq::own_t.
Definition at line 1445 of file socket_base.cpp.
References destroyed.
|
privatevirtual |
Reimplemented from zmq::object_t.
Definition at line 1402 of file socket_base.cpp.
References ctx_terminated, and stop_monitor().
|
privatevirtual |
Reimplemented from zmq::own_t.
Definition at line 1417 of file socket_base.cpp.
References pipes, zmq::own_t::process_term(), zmq::own_t::register_term_acks(), zmq::array_t< T, ID >::size(), zmq::own_t::terminate(), and zmq::object_t::unregister_endpoints().
|
virtual |
Implements zmq::i_pipe_events.
Definition at line 1557 of file socket_base.cpp.
References xread_activated().
int zmq::socket_base_t::recv | ( | zmq::msg_t * | msg_, |
int | flags_ | ||
) |
Definition at line 1174 of file socket_base.cpp.
References zmq::msg_t::check(), clock, ctx_terminated, ENTER_MUTEX, ETERM, EXIT_MUTEX, extract_flags(), zmq::inbound_poll_rate, zmq::clock_t::now_ms(), zmq::own_t::options, process_commands(), zmq::options_t::rcvtimeo, ticks, unlikely, xrecv(), and ZMQ_DONTWAIT.
Referenced by forward(), zmq::proxy(), and s_recvmsg().
int zmq::socket_base_t::remove_signaler | ( | signaler_t * | s | ) |
Definition at line 504 of file socket_base.cpp.
References ENTER_MUTEX, EXIT_MUTEX, mailbox, and thread_safe.
Referenced by zmq::socket_poller_t::remove().
int zmq::socket_base_t::send | ( | zmq::msg_t * | msg_, |
int | flags_ | ||
) |
Definition at line 1088 of file socket_base.cpp.
References zmq::msg_t::check(), clock, ctx_terminated, ENTER_MUTEX, ETERM, EXIT_MUTEX, zmq::msg_t::more, zmq::clock_t::now_ms(), zmq::own_t::options, process_commands(), zmq::msg_t::reset_flags(), zmq::msg_t::reset_metadata(), zmq::msg_t::set_flags(), zmq::options_t::sndtimeo, unlikely, xsend(), ZMQ_DONTWAIT, and ZMQ_SNDMORE.
Referenced by capture(), forward(), and s_sendmsg().
Definition at line 336 of file socket_base.cpp.
References ctx_terminated, ENTER_MUTEX, ETERM, EXIT_MUTEX, zmq::options_t::is_valid(), zmq::own_t::options, zmq::options_t::setsockopt(), unlikely, update_pipe_options(), and xsetsockopt().
Referenced by zmq_setsockopt().
void zmq::socket_base_t::start_reaping | ( | poller_t * | poller_ | ) |
Definition at line 1313 of file socket_base.cpp.
References check_destroy(), ENTER_MUTEX, EXIT_MUTEX, zmq::signaler_t::get_fd(), handle, mailbox, poller, reaper_signaler, zmq::signaler_t::send(), zmq::own_t::terminate(), and thread_safe.
Referenced by zmq::reaper_t::process_reap().
void zmq::socket_base_t::stop | ( | ) |
Definition at line 239 of file socket_base.cpp.
References zmq::object_t::send_stop().
|
protected |
Definition at line 1732 of file socket_base.cpp.
References monitor_event(), monitor_events, monitor_socket, zmq_close(), and ZMQ_EVENT_MONITOR_STOPPED.
Referenced by monitor(), process_stop(), and ~socket_base_t().
int zmq::socket_base_t::term_endpoint | ( | const char * | addr_ | ) |
Definition at line 985 of file socket_base.cpp.
References address, alloc_assert, check_protocol(), ctx_terminated, endpoints, ENTER_MUTEX, ETERM, EXIT_MUTEX, inprocs, zmq::options_t::ipv6, LIBZMQ_DELETE, zmq::own_t::options, parse_uri(), process_commands(), zmq::tcp_address_t::resolve(), zmq::own_t::term_child(), zmq::tcp_address_t::to_string(), unlikely, and zmq::object_t::unregister_endpoint().
Referenced by zmq_disconnect(), and zmq_unbind().
|
virtual |
Implements zmq::i_poll_events.
Definition at line 1533 of file socket_base.cpp.
References zmq_assert.
void zmq::socket_base_t::unlock | ( | ) |
|
private |
Definition at line 1433 of file socket_base.cpp.
References zmq::own_t::options, pipes, zmq::options_t::rcvhwm, zmq::array_t< T, ID >::size(), zmq::options_t::sndhwm, ZMQ_RCVHWM, and ZMQ_SNDHWM.
Referenced by setsockopt().
|
virtual |
Implements zmq::i_pipe_events.
Definition at line 1562 of file socket_base.cpp.
References xwrite_activated().
|
protectedpure virtual |
Implemented in zmq::dish_t, zmq::radio_t, zmq::xpub_t, zmq::client_t, zmq::dealer_t, zmq::router_t, zmq::server_t, zmq::xsub_t, zmq::gather_t, zmq::pull_t, zmq::push_t, zmq::scatter_t, zmq::pair_t, zmq::stream_t, and zmq::pub_t.
Referenced by attach_pipe().
|
protectedvirtual |
Reimplemented in zmq::dish_t, zmq::radio_t, zmq::xpub_t, zmq::dealer_t, zmq::router_t, zmq::client_t, zmq::server_t, zmq::xsub_t, zmq::gather_t, zmq::pull_t, zmq::pair_t, zmq::stream_t, zmq::req_t, zmq::pub_t, and zmq::rep_t.
Definition at line 1467 of file socket_base.cpp.
Referenced by has_in().
|
protectedvirtual |
Reimplemented in zmq::dealer_t, zmq::router_t, zmq::client_t, zmq::dish_t, zmq::radio_t, zmq::server_t, zmq::xpub_t, zmq::xsub_t, zmq::pair_t, zmq::push_t, zmq::scatter_t, zmq::stream_t, zmq::req_t, zmq::rep_t, and zmq::sub_t.
Definition at line 1456 of file socket_base.cpp.
Referenced by has_out().
|
protectedvirtual |
Reimplemented in zmq::dish_t, and zmq::xsub_t.
Definition at line 1506 of file socket_base.cpp.
References zmq_assert.
Referenced by hiccuped().
|
protectedvirtual |
Reimplemented in zmq::dish_t.
Definition at line 1472 of file socket_base.cpp.
References ENOTSUP, and LIBZMQ_UNUSED.
Referenced by join().
|
protectedvirtual |
Reimplemented in zmq::dish_t.
Definition at line 1479 of file socket_base.cpp.
References ENOTSUP, and LIBZMQ_UNUSED.
Referenced by leave().
|
protectedpure virtual |
Implemented in zmq::dish_t, zmq::dealer_t, zmq::radio_t, zmq::xpub_t, zmq::client_t, zmq::router_t, zmq::xsub_t, zmq::server_t, zmq::pair_t, zmq::gather_t, zmq::pull_t, zmq::push_t, zmq::scatter_t, zmq::stream_t, and zmq::req_t.
Referenced by pipe_terminated().
|
protectedvirtual |
Reimplemented in zmq::dish_t, zmq::dealer_t, zmq::radio_t, zmq::client_t, zmq::router_t, zmq::xpub_t, zmq::server_t, zmq::xsub_t, zmq::gather_t, zmq::pair_t, zmq::pull_t, and zmq::stream_t.
Definition at line 1497 of file socket_base.cpp.
References zmq_assert.
Referenced by read_activated().
|
protectedvirtual |
Reimplemented in zmq::dish_t, zmq::radio_t, zmq::xpub_t, zmq::dealer_t, zmq::router_t, zmq::client_t, zmq::server_t, zmq::xsub_t, zmq::gather_t, zmq::pull_t, zmq::pair_t, zmq::stream_t, zmq::req_t, zmq::pub_t, and zmq::rep_t.
Definition at line 1486 of file socket_base.cpp.
References ENOTSUP.
Referenced by recv().
|
protectedvirtual |
Reimplemented in zmq::dish_t, zmq::radio_t, zmq::dealer_t, zmq::router_t, zmq::xpub_t, zmq::client_t, zmq::server_t, zmq::xsub_t, zmq::push_t, zmq::scatter_t, zmq::pair_t, zmq::stream_t, zmq::sub_t, zmq::req_t, and zmq::rep_t.
Definition at line 1461 of file socket_base.cpp.
References ENOTSUP.
Referenced by send().
|
protectedvirtual |
Reimplemented in zmq::xpub_t, zmq::stream_t, zmq::dealer_t, zmq::router_t, zmq::req_t, and zmq::sub_t.
Definition at line 1450 of file socket_base.cpp.
Referenced by setsockopt().
|
protectedvirtual |
Reimplemented in zmq::dish_t, zmq::dealer_t, zmq::radio_t, zmq::client_t, zmq::router_t, zmq::xpub_t, zmq::server_t, zmq::xsub_t, zmq::pair_t, zmq::push_t, zmq::scatter_t, and zmq::stream_t.
Definition at line 1501 of file socket_base.cpp.
References zmq_assert.
Referenced by write_activated().
|
friend |
Definition at line 67 of file socket_base.hpp.
|
private |
Definition at line 265 of file socket_base.hpp.
|
protected |
Definition at line 186 of file socket_base.hpp.
Referenced by zmq::stream_t::identify_peer(), zmq::router_t::identify_peer(), zmq::router_t::xsetsockopt(), and zmq::stream_t::xsetsockopt().
|
private |
Definition at line 213 of file socket_base.hpp.
Referenced by bind(), connect(), getsockopt(), monitor(), process_commands(), process_stop(), recv(), send(), setsockopt(), and term_endpoint().
|
private |
Definition at line 218 of file socket_base.hpp.
Referenced by check_destroy(), create(), process_destroy(), and ~socket_base_t().
|
private |
Definition at line 195 of file socket_base.hpp.
Referenced by add_endpoint(), connect(), and term_endpoint().
|
private |
Definition at line 253 of file socket_base.hpp.
Referenced by check_destroy(), and start_reaping().
|
private |
Definition at line 199 of file socket_base.hpp.
Referenced by connect(), pipe_terminated(), and term_endpoint().
|
private |
Definition at line 274 of file socket_base.hpp.
Referenced by bind(), connect(), and getsockopt().
|
private |
Definition at line 256 of file socket_base.hpp.
Referenced by process_commands().
|
private |
Definition at line 245 of file socket_base.hpp.
Referenced by add_signaler(), close(), create(), get_mailbox(), getsockopt(), process_commands(), remove_signaler(), socket_base_t(), start_reaping(), and ~socket_base_t().
|
private |
Definition at line 271 of file socket_base.hpp.
Referenced by event_accept_failed(), event_accepted(), event_bind_failed(), event_close_failed(), event_closed(), event_connect_delayed(), event_connect_retried(), event_connected(), event_disconnected(), event_listening(), monitor(), and stop_monitor().
|
private |
Definition at line 268 of file socket_base.hpp.
Referenced by monitor(), monitor_event(), and stop_monitor().
|
private |
Definition at line 249 of file socket_base.hpp.
Referenced by attach_pipe(), pipe_terminated(), process_term(), and update_pipe_options().
|
private |
Definition at line 252 of file socket_base.hpp.
Referenced by check_destroy(), and start_reaping().
|
private |
Definition at line 262 of file socket_base.hpp.
Referenced by extract_flags(), and getsockopt().
|
private |
Definition at line 280 of file socket_base.hpp.
Referenced by in_event(), start_reaping(), and ~socket_base_t().
|
private |
Definition at line 283 of file socket_base.hpp.
Referenced by socket_base_t().
|
private |
Definition at line 210 of file socket_base.hpp.
Referenced by check_tag(), and close().
|
private |
Definition at line 277 of file socket_base.hpp.
Referenced by add_signaler(), close(), getsockopt(), in_event(), remove_signaler(), socket_base_t(), and start_reaping().
|
private |
Definition at line 259 of file socket_base.hpp.
Referenced by recv().