libzmq master
The Intelligent Transport Layer
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes

zmq::ctx_t Class Reference

#include <ctx.hpp>

Collaboration diagram for zmq::ctx_t:

List of all members.

Public Types

enum  { term_tid = 0, reaper_tid = 1 }

Public Member Functions

 ctx_t (uint32_t io_threads_)
bool check_tag ()
class io_thread_tchoose_io_thread (uint64_t affinity_)
class socket_base_tcreate_socket (int type_)
void destroy_socket (class socket_base_t *socket_)
endpoint_t find_endpoint (const char *addr_)
class object_tget_reaper ()
void log (const char *format_, va_list args_)
int register_endpoint (const char *addr_, endpoint_t &endpoint_)
void send_command (uint32_t tid_, const command_t &command_)
int terminate ()
void unregister_endpoints (class socket_base_t *socket_)

Private Types

typedef std::vector< uint32_t > emtpy_slots_t
typedef std::map< std::string,
endpoint_t
endpoints_t
typedef std::vector< class
io_thread_t * > 
io_threads_t
typedef array_t< socket_base_tsockets_t

Private Member Functions

 ctx_t (const ctx_t &)
 ~ctx_t ()
const ctx_toperator= (const ctx_t &)

Private Attributes

emtpy_slots_t empty_slots
endpoints_t endpoints
mutex_t endpoints_sync
io_threads_t io_threads
class socket_base_tlog_socket
mutex_t log_sync
class reaper_treaper
uint32_t slot_count
mutex_t slot_sync
mailbox_t ** slots
sockets_t sockets
uint32_t tag
mailbox_t term_mailbox
bool terminating

Detailed Description

Definition at line 51 of file ctx.hpp.


Member Typedef Documentation

typedef std::vector<uint32_t> zmq::ctx_t::emtpy_slots_t [private]

Definition at line 110 of file ctx.hpp.

typedef std::map<std::string, endpoint_t> zmq::ctx_t::endpoints_t [private]

Definition at line 137 of file ctx.hpp.

typedef std::vector<class io_thread_t*> zmq::ctx_t::io_threads_t [private]

Definition at line 126 of file ctx.hpp.

Definition at line 106 of file ctx.hpp.


Member Enumeration Documentation

anonymous enum
Enumerator:
term_tid 
reaper_tid 

Definition at line 91 of file ctx.hpp.


Constructor & Destructor Documentation

zmq::ctx_t::ctx_t ( uint32_t  io_threads_)
zmq::ctx_t::~ctx_t ( ) [private]

Definition at line 89 of file ctx.cpp.

References zmq_assert.

zmq::ctx_t::ctx_t ( const ctx_t ) [private]

Member Function Documentation

bool zmq::ctx_t::check_tag ( )

Definition at line 84 of file ctx.cpp.

zmq::io_thread_t * zmq::ctx_t::choose_io_thread ( uint64_t  affinity_)

Definition at line 228 of file ctx.cpp.

References zmq::io_thread_t::get_load(), and zmq_assert.

Here is the call graph for this function:

zmq::socket_base_t * zmq::ctx_t::create_socket ( int  type_)

Definition at line 161 of file ctx.cpp.

References zmq::socket_base_t::create(), ETERM, and zmq::socket_base_t::get_mailbox().

Referenced by ctx_t().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::ctx_t::destroy_socket ( class socket_base_t socket_)

Definition at line 198 of file ctx.cpp.

References zmq::object_t::get_tid().

Here is the call graph for this function:

zmq::endpoint_t zmq::ctx_t::find_endpoint ( const char *  addr_)

Definition at line 283 of file ctx.cpp.

References ECONNREFUSED, zmq::own_t::inc_seqnum(), and zmq::endpoint_t::socket.

Here is the call graph for this function:

zmq::object_t * zmq::ctx_t::get_reaper ( )

Definition at line 218 of file ctx.cpp.

void zmq::ctx_t::log ( const char *  format_,
va_list  args_ 
)

Definition at line 306 of file ctx.cpp.

References zmq::msg_t::close(), zmq::msg_t::data, errno_assert, zmq::msg_t::init_size(), and zmq::msg_t::size.

Here is the call graph for this function:

const ctx_t& zmq::ctx_t::operator= ( const ctx_t ) [private]
int zmq::ctx_t::register_endpoint ( const char *  addr_,
endpoint_t endpoint_ 
)

Definition at line 249 of file ctx.cpp.

References EADDRINUSE.

void zmq::ctx_t::send_command ( uint32_t  tid_,
const command_t command_ 
)

Definition at line 223 of file ctx.cpp.

int zmq::ctx_t::terminate ( )

Definition at line 115 of file ctx.cpp.

References zmq::command_t::done, zmq::command_t::type, and zmq_assert.

void zmq::ctx_t::unregister_endpoints ( class socket_base_t socket_)

Definition at line 265 of file ctx.cpp.


Member Data Documentation

Definition at line 111 of file ctx.hpp.

Referenced by ctx_t().

Definition at line 138 of file ctx.hpp.

Definition at line 141 of file ctx.hpp.

Definition at line 127 of file ctx.hpp.

Referenced by ctx_t().

Definition at line 145 of file ctx.hpp.

Referenced by ctx_t().

Definition at line 146 of file ctx.hpp.

class reaper_t* zmq::ctx_t::reaper [private]

Definition at line 123 of file ctx.hpp.

Referenced by ctx_t().

uint32_t zmq::ctx_t::slot_count [private]

Definition at line 130 of file ctx.hpp.

Referenced by ctx_t().

Definition at line 120 of file ctx.hpp.

Definition at line 131 of file ctx.hpp.

Referenced by ctx_t().

Definition at line 107 of file ctx.hpp.

uint32_t zmq::ctx_t::tag [private]

Definition at line 101 of file ctx.hpp.

Definition at line 134 of file ctx.hpp.

Referenced by ctx_t().

bool zmq::ctx_t::terminating [private]

Definition at line 114 of file ctx.hpp.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines