libzmq  master
ZeroMQ C++ Core Engine (LIBZMQ)
zmq Namespace Reference

Classes

struct  address_t
 
class  array_item_t
 
class  array_t
 
class  atomic_counter_t
 
class  atomic_ptr_t
 
class  c_single_allocator
 
class  client_t
 
class  clock_t
 
struct  command_t
 
class  condition_variable_t
 
class  ctx_t
 
class  dbuffer_t
 
class  dbuffer_t< msg_t >
 
class  dealer_t
 
class  decoder_base_t
 
class  dish_session_t
 
class  dish_t
 
class  dist_t
 
class  encoder_base_t
 
struct  endpoint_t
 
class  fq_t
 
class  gather_t
 
class  i_decoder
 
struct  i_encoder
 
struct  i_engine
 
class  i_mailbox
 
struct  i_pipe_events
 
struct  i_poll_events
 
class  io_object_t
 
class  io_thread_t
 
class  ipc_address_t
 
class  ipc_connecter_t
 
class  ipc_listener_t
 
class  lb_t
 
class  mailbox_safe_t
 
class  mailbox_t
 
class  mechanism_t
 
class  metadata_t
 
class  msg_t
 
class  mtrie_t
 
class  mutex_t
 
class  null_mechanism_t
 
class  object_t
 
struct  options_t
 
class  own_t
 
class  pair_t
 
class  pipe_t
 
class  plain_client_t
 
class  plain_server_t
 
class  poller_base_t
 
class  pub_t
 
class  pull_t
 
class  push_t
 
class  radio_session_t
 
class  radio_t
 
class  raw_decoder_t
 
class  raw_encoder_t
 
class  reaper_t
 
class  rep_t
 
class  req_session_t
 
class  req_t
 
class  router_t
 
class  scatter_t
 
struct  scoped_lock_t
 
class  server_t
 
class  session_base_t
 
class  shared_message_memory_allocator
 
class  signaler_t
 
class  socket_base_t
 
class  socket_poller_t
 
class  socks_choice_decoder_t
 
struct  socks_choice_t
 
class  socks_connecter_t
 
class  socks_greeting_encoder_t
 
struct  socks_greeting_t
 
class  socks_request_encoder_t
 
struct  socks_request_t
 
class  socks_response_decoder_t
 
struct  socks_response_t
 
class  stream_engine_t
 
class  stream_t
 
class  sub_t
 
class  tcp_address_mask_t
 
class  tcp_address_t
 
class  tcp_connecter_t
 
class  tcp_listener_t
 
class  thread_t
 
class  timers_t
 
class  trie_t
 
class  udp_address_t
 
class  udp_engine_t
 
class  v1_decoder_t
 
class  v1_encoder_t
 
class  v2_decoder_t
 
class  v2_encoder_t
 
class  v2_protocol_t
 
class  xpub_t
 
class  xsub_t
 
class  ypipe_base_t
 
class  ypipe_conflate_t
 
class  ypipe_t
 
class  yqueue_t
 

Typedefs

typedef std::basic_string< unsigned char > blob_t
 
typedef int fd_t
 
typedef void( thread_fn) (void *)
 
typedef void( timers_timer_fn) (int timer_id, void *arg)
 

Enumerations

enum  {
  message_pipe_granularity = 256, command_pipe_granularity = 16, inbound_poll_rate = 100, in_batch_size = 8192,
  out_batch_size = 8192, max_wm_delta = 1024, max_io_events = 256, max_command_delay = 3000000,
  clock_precision = 1000000, signaler_port = 0
}
 
enum  { retired_fd = -1 }
 
enum  { ZMTP_1_0 = 0, ZMTP_2_0 = 1 }
 

Functions

struct zmq::command_t __attribute__ ((aligned(64)))
 
void enable_ipv4_mapping (fd_t s_)
 
const char * errno_to_string (int errno_)
 
uint32_t generate_random ()
 
int get_peer_ip_address (fd_t sockfd_, std::string &ip_addr_)
 
uint16_t get_uint16 (const unsigned char *buffer_)
 
uint32_t get_uint32 (const unsigned char *buffer_)
 
uint64_t get_uint64 (const unsigned char *buffer_)
 
uint8_t get_uint8 (const unsigned char *buffer_)
 
fd_t open_socket (int domain_, int type_, int protocol_)
 
int pipepair (zmq::object_t *parents_[2], zmq::pipe_t *pipes_[2], int hwms_[2], bool conflate_[2])
 
void print_backtrace (void)
 
int proxy (class socket_base_t *frontend_, class socket_base_t *backend_, class socket_base_t *capture_, class socket_base_t *control_=NULL)
 
void put_uint16 (unsigned char *buffer_, uint16_t value)
 
void put_uint32 (unsigned char *buffer_, uint32_t value)
 
void put_uint64 (unsigned char *buffer_, uint64_t value)
 
void put_uint8 (unsigned char *buffer_, uint8_t value)
 
void seed_random ()
 
void set_ip_type_of_service (fd_t s_, int iptos)
 
void set_tcp_receive_buffer (fd_t sockfd_, int bufsize_)
 
void set_tcp_send_buffer (fd_t sockfd_, int bufsize_)
 
int tcp_read (fd_t s_, void *data_, size_t size_)
 
int tcp_write (fd_t s_, const void *data_, size_t size_)
 
void tune_tcp_keepalives (fd_t s_, int keepalive_, int keepalive_cnt_, int keepalive_idle_, int keepalive_intvl_)
 
void tune_tcp_maxrt (fd_t sockfd_, int timeout_)
 
void tune_tcp_socket (fd_t s_)
 
void unblock_socket (fd_t s_)
 
void zmq_abort (const char *errmsg_)
 

Typedef Documentation

typedef std::basic_string<unsigned char> zmq::blob_t

Definition at line 134 of file blob.hpp.

typedef int zmq::fd_t

Definition at line 50 of file fd.hpp.

typedef void( zmq::thread_fn) (void *)

Definition at line 44 of file thread.hpp.

typedef void( zmq::timers_timer_fn) (int timer_id, void *arg)

Definition at line 41 of file timers.hpp.

Enumeration Type Documentation

anonymous enum
Enumerator
message_pipe_granularity 
command_pipe_granularity 
inbound_poll_rate 
in_batch_size 
out_batch_size 
max_wm_delta 
max_io_events 
max_command_delay 
clock_precision 
signaler_port 

Definition at line 38 of file config.hpp.

anonymous enum
Enumerator
retired_fd 

Definition at line 51 of file fd.hpp.

anonymous enum
Enumerator
ZMTP_1_0 
ZMTP_2_0 

Definition at line 48 of file stream_engine.hpp.

Function Documentation

struct zmq::command_t zmq::__attribute__ ( (aligned(64))  )
void zmq::enable_ipv4_mapping ( fd_t  s_)

Definition at line 103 of file ip.cpp.

References errno_assert.

Referenced by zmq::socks_connecter_t::connect_to_proxy(), zmq::tcp_connecter_t::open(), and zmq::tcp_listener_t::set_address().

Here is the caller graph for this function:

const char * zmq::errno_to_string ( int  errno_)

Definition at line 33 of file err.cpp.

References EADDRINUSE, EADDRNOTAVAIL, ECONNREFUSED, EFSM, EINPROGRESS, EMTHREAD, ENETDOWN, ENOBUFS, ENOCOMPATPROTO, ENOTSUP, EPROTONOSUPPORT, and ETERM.

Referenced by zmq_strerror().

Here is the caller graph for this function:

uint32_t zmq::generate_random ( )
int zmq::get_peer_ip_address ( fd_t  sockfd_,
std::string &  ip_addr_ 
)

Definition at line 123 of file ip.cpp.

References ENOTSOCK, and errno_assert.

Referenced by zmq::stream_engine_t::stream_engine_t().

Here is the caller graph for this function:

uint16_t zmq::get_uint16 ( const unsigned char *  buffer_)
inline

Definition at line 57 of file wire.hpp.

uint32_t zmq::get_uint32 ( const unsigned char *  buffer_)
inline

Definition at line 72 of file wire.hpp.

Referenced by zmq::mechanism_t::parse_metadata().

Here is the caller graph for this function:

uint64_t zmq::get_uint64 ( const unsigned char *  buffer_)
inline

Definition at line 93 of file wire.hpp.

Referenced by zmq::v1_decoder_t::eight_byte_size_ready(), and zmq::v2_decoder_t::eight_byte_size_ready().

Here is the caller graph for this function:

uint8_t zmq::get_uint8 ( const unsigned char *  buffer_)
inline

Definition at line 46 of file wire.hpp.

zmq::fd_t zmq::open_socket ( int  domain_,
int  type_,
int  protocol_ 
)
int zmq::pipepair ( zmq::object_t parents_[2],
zmq::pipe_t pipes_[2],
int  hwms_[2],
bool  conflate_[2] 
)

Definition at line 41 of file pipe.cpp.

References alloc_assert, and zmq::pipe_t::set_peer().

Referenced by zmq::socket_base_t::connect(), zmq::session_base_t::process_attach(), and zmq::session_base_t::zap_connect().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::print_backtrace ( void  )

Definition at line 441 of file err.cpp.

Referenced by zmq_abort().

Here is the caller graph for this function:

int zmq::proxy ( class socket_base_t frontend_,
class socket_base_t backend_,
class socket_base_t capture_,
class socket_base_t control_ = NULL 
)

Definition at line 105 of file proxy.cpp.

References capture(), zmq::msg_t::data, forward(), zmq::socket_base_t::getsockopt(), zmq::msg_t::init(), zmq::socket_base_t::recv(), zmq::msg_t::size, unlikely, zmq_assert, zmq_poll(), ZMQ_POLLIN, ZMQ_POLLOUT, and ZMQ_RCVMORE.

Referenced by zmq_device(), zmq_proxy(), and zmq_proxy_steerable().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::put_uint16 ( unsigned char *  buffer_,
uint16_t  value 
)
inline

Definition at line 51 of file wire.hpp.

void zmq::put_uint32 ( unsigned char *  buffer_,
uint32_t  value 
)
inline

Definition at line 64 of file wire.hpp.

Referenced by zmq::mechanism_t::add_property(), zmq::stream_t::identify_peer(), and zmq::router_t::identify_peer().

Here is the caller graph for this function:

void zmq::put_uint64 ( unsigned char *  buffer_,
uint64_t  value 
)
inline

Definition at line 81 of file wire.hpp.

Referenced by zmq::v1_encoder_t::message_ready(), zmq::v2_encoder_t::message_ready(), and zmq::stream_engine_t::plug().

Here is the caller graph for this function:

void zmq::put_uint8 ( unsigned char *  buffer_,
uint8_t  value 
)
inline

Definition at line 41 of file wire.hpp.

void zmq::seed_random ( )

Definition at line 44 of file random.cpp.

void zmq::set_ip_type_of_service ( fd_t  s_,
int  iptos 
)

Definition at line 169 of file ip.cpp.

References errno_assert.

Referenced by zmq::tcp_listener_t::accept(), zmq::socks_connecter_t::connect_to_proxy(), zmq::tcp_connecter_t::open(), and zmq::tcp_listener_t::set_address().

Here is the caller graph for this function:

void zmq::set_tcp_receive_buffer ( fd_t  sockfd_,
int  bufsize_ 
)

Definition at line 85 of file tcp.cpp.

References errno_assert.

Referenced by zmq::socks_connecter_t::connect_to_proxy(), zmq::tcp_connecter_t::open(), and zmq::tcp_listener_t::set_address().

Here is the caller graph for this function:

void zmq::set_tcp_send_buffer ( fd_t  sockfd_,
int  bufsize_ 
)

Definition at line 74 of file tcp.cpp.

References errno_assert.

Referenced by zmq::socks_connecter_t::connect_to_proxy(), zmq::tcp_connecter_t::open(), and zmq::tcp_listener_t::set_address().

Here is the caller graph for this function:

int zmq::tcp_read ( fd_t  s_,
void *  data_,
size_t  size_ 
)

Definition at line 248 of file tcp.cpp.

References ENOTSOCK, and errno_assert.

Referenced by zmq::stream_engine_t::handshake(), zmq::stream_engine_t::in_event(), zmq::socks_choice_decoder_t::input(), and zmq::socks_response_decoder_t::input().

Here is the caller graph for this function:

int zmq::tcp_write ( fd_t  s_,
const void *  data_,
size_t  size_ 
)

Definition at line 187 of file tcp.cpp.

References EMSGSIZE, ENOTSOCK, and errno_assert.

Referenced by zmq::stream_engine_t::out_event(), zmq::socks_greeting_encoder_t::output(), and zmq::socks_request_encoder_t::output().

Here is the caller graph for this function:

void zmq::tune_tcp_keepalives ( fd_t  s_,
int  keepalive_,
int  keepalive_cnt_,
int  keepalive_idle_,
int  keepalive_intvl_ 
)

Definition at line 96 of file tcp.cpp.

References errno_assert, and LIBZMQ_UNUSED.

Referenced by zmq::socks_connecter_t::check_proxy_connection(), zmq::tcp_listener_t::in_event(), and zmq::tcp_connecter_t::out_event().

Here is the caller graph for this function:

void zmq::tune_tcp_maxrt ( fd_t  sockfd_,
int  timeout_ 
)

Definition at line 166 of file tcp.cpp.

References errno_assert, and LIBZMQ_UNUSED.

Referenced by zmq::tcp_listener_t::in_event(), and zmq::tcp_connecter_t::out_event().

Here is the caller graph for this function:

void zmq::tune_tcp_socket ( fd_t  s_)

Definition at line 51 of file tcp.cpp.

References errno_assert.

Referenced by zmq::socks_connecter_t::check_proxy_connection(), zmq::tcp_listener_t::in_event(), and zmq::tcp_connecter_t::out_event().

Here is the caller graph for this function:

void zmq::unblock_socket ( fd_t  s_)
void zmq::zmq_abort ( const char *  errmsg_)