libzmq  master
ZeroMQ C++ Core Engine (LIBZMQ)
zmq::socket_base_t Class Referenceabstract

#include <socket_base.hpp>

Inheritance diagram for zmq::socket_base_t:
Collaboration diagram for zmq::socket_base_t:

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_mailboxget_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_)
 
- Public Member Functions inherited from zmq::own_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 ()
 
- 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)
 
- Public Member Functions inherited from zmq::array_item_t<>
 array_item_t ()
 
virtual ~array_item_t ()
 
int get_array_index ()
 
void set_array_index (int index_)
 
- Public Member Functions inherited from zmq::i_poll_events
virtual ~i_poll_events ()
 
- Public Member Functions inherited from zmq::i_pipe_events
virtual ~i_pipe_events ()
 

Static Public Member Functions

static socket_base_tcreate (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_)
 
- Protected Member Functions inherited from zmq::own_t
virtual ~own_t ()
 
bool is_terminating ()
 
void launch_child (own_t *object_)
 
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_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
 
- Protected Attributes inherited from zmq::own_t
options_t options
 

Private Types

typedef std::pair< own_t *, pipe_t * > endpoint_pipe_t
 
typedef std::multimap< std::string, endpoint_pipe_tendpoints_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_toperator= (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_mailboxmailbox
 
int monitor_events
 
void * monitor_socket
 
pipes_t pipes
 
poller_t * poller
 
bool rcvmore
 
signaler_treaper_signaler
 
mutex_t sync
 
uint32_t tag
 
bool thread_safe
 
int ticks
 

Friends

class reaper_t
 

Detailed Description

Definition at line 61 of file socket_base.hpp.

Member Typedef Documentation

typedef std::pair<own_t *, pipe_t*> zmq::socket_base_t::endpoint_pipe_t
private

Definition at line 193 of file socket_base.hpp.

typedef std::multimap<std::string, endpoint_pipe_t> zmq::socket_base_t::endpoints_t
private

Definition at line 194 of file socket_base.hpp.

typedef std::multimap<std::string, pipe_t *> zmq::socket_base_t::inprocs_t
private

Definition at line 198 of file socket_base.hpp.

Definition at line 248 of file socket_base.hpp.

Constructor & Destructor Documentation

zmq::socket_base_t::socket_base_t ( zmq::ctx_t parent_,
uint32_t  tid_,
int  sid_,
bool  thread_safe_ = false 
)
protected
zmq::socket_base_t::~socket_base_t ( )
protectedvirtual

Definition at line 222 of file socket_base.cpp.

References destroyed, LIBZMQ_DELETE, mailbox, reaper_signaler, stop_monitor(), and zmq_assert.

Here is the call graph for this function:

zmq::socket_base_t::socket_base_t ( const socket_base_t )
private

Member Function Documentation

void zmq::socket_base_t::add_endpoint ( const char *  addr_,
own_t endpoint_,
pipe_t pipe 
)
private

Definition at line 978 of file socket_base.cpp.

References endpoints, and zmq::own_t::launch_child().

Referenced by bind(), and connect().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

void zmq::socket_base_t::attach_pipe ( zmq::pipe_t pipe_,
bool  subscribe_to_all_ = false 
)
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().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::socket_base_t::check_destroy ( )
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().

Here is the call graph for this function:

Here is the caller graph for this function:

int zmq::socket_base_t::check_protocol ( const std::string &  protocol_)
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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

zmq::socket_base_t * zmq::socket_base_t::create ( int  type_,
zmq::ctx_t parent_,
uint32_t  tid_,
int  sid_ 
)
static
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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::socket_base_t::extract_flags ( msg_t msg_)
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().

Here is the caller graph for this function:

zmq::blob_t zmq::socket_base_t::get_credential ( ) const
protectedvirtual
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().

Here is the caller graph for this function:

int zmq::socket_base_t::getsockopt ( int  option_,
void *  optval_,
size_t *  optvallen_ 
)
bool zmq::socket_base_t::has_in ( )

Definition at line 1303 of file socket_base.cpp.

References xhas_in().

Referenced by getsockopt().

Here is the call graph for this function:

Here is the caller graph for this function:

bool zmq::socket_base_t::has_out ( )

Definition at line 1308 of file socket_base.cpp.

References xhas_out().

Referenced by getsockopt().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::socket_base_t::hiccuped ( pipe_t pipe_)
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().

Here is the call graph for this function:

void zmq::socket_base_t::in_event ( )
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.

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::socket_base_t::lock ( )
int zmq::socket_base_t::monitor ( const char *  endpoint_,
int  events_ 
)

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::socket_base_t::monitor_event ( int  event_,
int  value_,
const std::string &  addr_ 
)
protected
const socket_base_t& zmq::socket_base_t::operator= ( const socket_base_t )
private
void zmq::socket_base_t::out_event ( )
virtual

Implements zmq::i_poll_events.

Definition at line 1528 of file socket_base.cpp.

References zmq_assert.

int zmq::socket_base_t::parse_uri ( const char *  uri_,
std::string &  protocol_,
std::string &  address_ 
)
private

Definition at line 248 of file socket_base.cpp.

References zmq_assert.

Referenced by bind(), connect(), monitor(), and term_endpoint().

Here is the caller graph for this function:

void zmq::socket_base_t::pipe_terminated ( pipe_t pipe_)
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().

Here is the call graph for this function:

void zmq::socket_base_t::process_bind ( zmq::pipe_t pipe_)
privatevirtual

Reimplemented from zmq::object_t.

Definition at line 1412 of file socket_base.cpp.

References attach_pipe().

Here is the call graph for this function:

int zmq::socket_base_t::process_commands ( int  timeout_,
bool  throttle_ 
)
private

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::socket_base_t::process_destroy ( )
protectedvirtual

Reimplemented from zmq::own_t.

Definition at line 1445 of file socket_base.cpp.

References destroyed.

void zmq::socket_base_t::process_stop ( )
privatevirtual

Reimplemented from zmq::object_t.

Definition at line 1402 of file socket_base.cpp.

References ctx_terminated, and stop_monitor().

Here is the call graph for this function:

void zmq::socket_base_t::process_term ( int  linger_)
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().

Here is the call graph for this function:

void zmq::socket_base_t::read_activated ( pipe_t pipe_)
virtual

Implements zmq::i_pipe_events.

Definition at line 1557 of file socket_base.cpp.

References xread_activated().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

int zmq::socket_base_t::send ( zmq::msg_t msg_,
int  flags_ 
)
int zmq::socket_base_t::setsockopt ( int  option_,
const void *  optval_,
size_t  optvallen_ 
)

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::socket_base_t::stop ( )

Definition at line 239 of file socket_base.cpp.

References zmq::object_t::send_stop().

Here is the call graph for this function:

void zmq::socket_base_t::stop_monitor ( bool  send_monitor_stopped_event_ = true)
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().

Here is the call graph for this function:

Here is the caller graph for this function:

int zmq::socket_base_t::term_endpoint ( const char *  addr_)
void zmq::socket_base_t::timer_event ( int  id_)
virtual

Implements zmq::i_poll_events.

Definition at line 1533 of file socket_base.cpp.

References zmq_assert.

void zmq::socket_base_t::unlock ( )
void zmq::socket_base_t::update_pipe_options ( int  option_)
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().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::socket_base_t::write_activated ( pipe_t pipe_)
virtual

Implements zmq::i_pipe_events.

Definition at line 1562 of file socket_base.cpp.

References xwrite_activated().

Here is the call graph for this function:

virtual void zmq::socket_base_t::xattach_pipe ( zmq::pipe_t pipe_,
bool  subscribe_to_all_ = false 
)
protectedpure virtual
bool zmq::socket_base_t::xhas_in ( )
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().

Here is the caller graph for this function:

bool zmq::socket_base_t::xhas_out ( )
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().

Here is the caller graph for this function:

void zmq::socket_base_t::xhiccuped ( pipe_t pipe_)
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().

Here is the caller graph for this function:

int zmq::socket_base_t::xjoin ( const char *  group_)
protectedvirtual

Reimplemented in zmq::dish_t.

Definition at line 1472 of file socket_base.cpp.

References ENOTSUP, and LIBZMQ_UNUSED.

Referenced by join().

Here is the caller graph for this function:

int zmq::socket_base_t::xleave ( const char *  group_)
protectedvirtual

Reimplemented in zmq::dish_t.

Definition at line 1479 of file socket_base.cpp.

References ENOTSUP, and LIBZMQ_UNUSED.

Referenced by leave().

Here is the caller graph for this function:

virtual void zmq::socket_base_t::xpipe_terminated ( pipe_t pipe_)
protectedpure virtual
void zmq::socket_base_t::xread_activated ( pipe_t pipe_)
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().

Here is the caller graph for this function:

int zmq::socket_base_t::xrecv ( zmq::msg_t msg_)
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().

Here is the caller graph for this function:

int zmq::socket_base_t::xsend ( zmq::msg_t msg_)
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().

Here is the caller graph for this function:

int zmq::socket_base_t::xsetsockopt ( int  option_,
const void *  optval_,
size_t  optvallen_ 
)
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().

Here is the caller graph for this function:

void zmq::socket_base_t::xwrite_activated ( pipe_t pipe_)
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().

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class reaper_t
friend

Definition at line 67 of file socket_base.hpp.

Member Data Documentation

clock_t zmq::socket_base_t::clock
private

Definition at line 265 of file socket_base.hpp.

Referenced by recv(), and send().

std::string zmq::socket_base_t::connect_rid
protected
bool zmq::socket_base_t::ctx_terminated
private
bool zmq::socket_base_t::destroyed
private

Definition at line 218 of file socket_base.hpp.

Referenced by check_destroy(), create(), process_destroy(), and ~socket_base_t().

endpoints_t zmq::socket_base_t::endpoints
private

Definition at line 195 of file socket_base.hpp.

Referenced by add_endpoint(), connect(), and term_endpoint().

poller_t::handle_t zmq::socket_base_t::handle
private

Definition at line 253 of file socket_base.hpp.

Referenced by check_destroy(), and start_reaping().

inprocs_t zmq::socket_base_t::inprocs
private

Definition at line 199 of file socket_base.hpp.

Referenced by connect(), pipe_terminated(), and term_endpoint().

std::string zmq::socket_base_t::last_endpoint
private

Definition at line 274 of file socket_base.hpp.

Referenced by bind(), connect(), and getsockopt().

uint64_t zmq::socket_base_t::last_tsc
private

Definition at line 256 of file socket_base.hpp.

Referenced by process_commands().

void* zmq::socket_base_t::monitor_socket
private

Definition at line 268 of file socket_base.hpp.

Referenced by monitor(), monitor_event(), and stop_monitor().

pipes_t zmq::socket_base_t::pipes
private

Definition at line 249 of file socket_base.hpp.

Referenced by attach_pipe(), pipe_terminated(), process_term(), and update_pipe_options().

poller_t* zmq::socket_base_t::poller
private

Definition at line 252 of file socket_base.hpp.

Referenced by check_destroy(), and start_reaping().

bool zmq::socket_base_t::rcvmore
private

Definition at line 262 of file socket_base.hpp.

Referenced by extract_flags(), and getsockopt().

signaler_t* zmq::socket_base_t::reaper_signaler
private

Definition at line 280 of file socket_base.hpp.

Referenced by in_event(), start_reaping(), and ~socket_base_t().

mutex_t zmq::socket_base_t::sync
private

Definition at line 283 of file socket_base.hpp.

Referenced by socket_base_t().

uint32_t zmq::socket_base_t::tag
private

Definition at line 210 of file socket_base.hpp.

Referenced by check_tag(), and close().

bool zmq::socket_base_t::thread_safe
private
int zmq::socket_base_t::ticks
private

Definition at line 259 of file socket_base.hpp.

Referenced by recv().