libzmq master
The Intelligent Transport Layer
Typedefs | Functions

zmq.cpp File Reference

#include "platform.hpp"
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <new>
#include "socket_base.hpp"
#include "stdint.hpp"
#include "config.hpp"
#include "likely.hpp"
#include "clock.hpp"
#include "ctx.hpp"
#include "err.hpp"
#include "msg.hpp"
#include "fd.hpp"
Include dependency graph for zmq.cpp:

Go to the source code of this file.

Typedefs

typedef char check_msg_t_size [sizeof(zmq::msg_t)==sizeof(zmq_msg_t)?1:-1]

Functions

int zmq_bind (void *s_, const char *addr_)
int zmq_close (void *s_)
int zmq_connect (void *s_, const char *addr_)
int zmq_errno ()
int zmq_getmsgopt (zmq_msg_t *msg_, int option_, void *optval_, size_t *optvallen_)
int zmq_getsockopt (void *s_, int option_, void *optval_, size_t *optvallen_)
void * zmq_init (int io_threads_)
int zmq_msg_close (zmq_msg_t *msg_)
int zmq_msg_copy (zmq_msg_t *dest_, zmq_msg_t *src_)
void * zmq_msg_data (zmq_msg_t *msg_)
int zmq_msg_init (zmq_msg_t *msg_)
int zmq_msg_init_data (zmq_msg_t *msg_, void *data_, size_t size_, zmq_free_fn *ffn_, void *hint_)
int zmq_msg_init_size (zmq_msg_t *msg_, size_t size_)
int zmq_msg_move (zmq_msg_t *dest_, zmq_msg_t *src_)
size_t zmq_msg_size (zmq_msg_t *msg_)
int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
int zmq_recv (void *s_, void *buf_, size_t len_, int flags_)
int zmq_recvmsg (void *s_, zmq_msg_t *msg_, int flags_)
int zmq_send (void *s_, const void *buf_, size_t len_, int flags_)
int zmq_sendmsg (void *s_, zmq_msg_t *msg_, int flags_)
int zmq_setsockopt (void *s_, int option_, const void *optval_, size_t optvallen_)
void * zmq_socket (void *ctx_, int type_)
const char * zmq_strerror (int errnum_)
int zmq_term (void *ctx_)
void zmq_version (int *major_, int *minor_, int *patch_)

Typedef Documentation

typedef char check_msg_t_size[sizeof(zmq::msg_t)==sizeof(zmq_msg_t)?1:-1]

Definition at line 79 of file zmq.cpp.


Function Documentation

int zmq_bind ( void *  s_,
const char *  addr_ 
)

Definition at line 211 of file zmq.cpp.

References ENOTSOCK.

Referenced by main().

Here is the caller graph for this function:

int zmq_close ( void *  s_)

Definition at line 180 of file zmq.cpp.

References ENOTSOCK.

Referenced by main(), and worker().

Here is the caller graph for this function:

int zmq_connect ( void *  s_,
const char *  addr_ 
)

Definition at line 220 of file zmq.cpp.

References ENOTSOCK.

Referenced by main(), and worker().

Here is the caller graph for this function:

int zmq_errno ( void  )

Definition at line 714 of file zmq.cpp.

Referenced by main().

Here is the caller graph for this function:

int zmq_getmsgopt ( zmq_msg_t msg_,
int  option_,
void *  optval_,
size_t *  optvallen_ 
)

Definition at line 343 of file zmq.cpp.

References zmq::msg_t::more, and ZMQ_MORE.

Referenced by main().

Here is the caller graph for this function:

int zmq_getsockopt ( void *  s_,
int  option_,
void *  optval_,
size_t *  optvallen_ 
)

Definition at line 201 of file zmq.cpp.

References ENOTSOCK.

Referenced by bounce(), main(), and zmq_poll().

Here is the caller graph for this function:

void* zmq_init ( int  io_threads_)

Definition at line 93 of file zmq.cpp.

References alloc_assert, and zmq_assert.

Referenced by main().

Here is the caller graph for this function:

int zmq_msg_close ( zmq_msg_t msg_)

Definition at line 318 of file zmq.cpp.

Referenced by main(), worker(), zmq_recv(), and zmq_send().

Here is the caller graph for this function:

int zmq_msg_copy ( zmq_msg_t dest_,
zmq_msg_t src_ 
)

Definition at line 328 of file zmq.cpp.

void* zmq_msg_data ( zmq_msg_t msg_)

Definition at line 333 of file zmq.cpp.

Referenced by main(), worker(), zmq_recv(), and zmq_send().

Here is the caller graph for this function:

int zmq_msg_init ( zmq_msg_t msg_)

Definition at line 302 of file zmq.cpp.

Referenced by main(), worker(), and zmq_recv().

Here is the caller graph for this function:

int zmq_msg_init_data ( zmq_msg_t msg_,
void *  data_,
size_t  size_,
zmq_free_fn ffn_,
void *  hint_ 
)

Definition at line 312 of file zmq.cpp.

int zmq_msg_init_size ( zmq_msg_t msg_,
size_t  size_ 
)

Definition at line 307 of file zmq.cpp.

Referenced by main(), worker(), and zmq_send().

Here is the caller graph for this function:

int zmq_msg_move ( zmq_msg_t dest_,
zmq_msg_t src_ 
)

Definition at line 323 of file zmq.cpp.

size_t zmq_msg_size ( zmq_msg_t msg_)

Definition at line 338 of file zmq.cpp.

Referenced by main(), zmq_recvmsg(), and zmq_sendmsg().

Here is the caller graph for this function:

int zmq_poll ( zmq_pollitem_t items_,
int  nitems_,
long  timeout_ 
)
int zmq_recv ( void *  s_,
void *  buf_,
size_t  len_,
int  flags_ 
)

Definition at line 251 of file zmq.cpp.

References errno_assert, unlikely, zmq_msg_close(), zmq_msg_data(), zmq_msg_init(), and zmq_recvmsg().

Referenced by bounce(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

int zmq_recvmsg ( void *  s_,
zmq_msg_t msg_,
int  flags_ 
)

Definition at line 290 of file zmq.cpp.

References ENOTSOCK, unlikely, and zmq_msg_size().

Referenced by main(), worker(), and zmq_recv().

Here is the call graph for this function:

Here is the caller graph for this function:

int zmq_send ( void *  s_,
const void *  buf_,
size_t  len_,
int  flags_ 
)

Definition at line 229 of file zmq.cpp.

References errno_assert, unlikely, zmq_msg_close(), zmq_msg_data(), zmq_msg_init_size(), and zmq_sendmsg().

Referenced by bounce(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

int zmq_sendmsg ( void *  s_,
zmq_msg_t msg_,
int  flags_ 
)

Definition at line 277 of file zmq.cpp.

References ENOTSOCK, unlikely, and zmq_msg_size().

Referenced by main(), worker(), and zmq_send().

Here is the call graph for this function:

Here is the caller graph for this function:

int zmq_setsockopt ( void *  s_,
int  option_,
const void *  optval_,
size_t  optvallen_ 
)

Definition at line 190 of file zmq.cpp.

References ENOTSOCK.

Referenced by main().

Here is the caller graph for this function:

void* zmq_socket ( void *  ctx_,
int  type_ 
)

Definition at line 171 of file zmq.cpp.

Referenced by main(), and worker().

Here is the caller graph for this function:

const char* zmq_strerror ( int  errnum_)

Definition at line 88 of file zmq.cpp.

Referenced by main(), and worker().

Here is the caller graph for this function:

int zmq_term ( void *  ctx_)

Definition at line 145 of file zmq.cpp.

References zmq_assert.

Referenced by main().

Here is the caller graph for this function:

void zmq_version ( int *  major_,
int *  minor_,
int *  patch_ 
)

Definition at line 81 of file zmq.cpp.

References ZMQ_VERSION_MAJOR, ZMQ_VERSION_MINOR, and ZMQ_VERSION_PATCH.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines