libzmq master
The Intelligent Transport Layer
Classes | Defines | Typedefs | Functions

zmq.h File Reference

#include <errno.h>
#include <stddef.h>
Include dependency graph for zmq.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  zmq_msg_t
struct  zmq_pollitem_t

Defines

#define EADDRINUSE   (ZMQ_HAUSNUMERO + 5)
#define EADDRNOTAVAIL   (ZMQ_HAUSNUMERO + 6)
#define EAFNOSUPPORT   (ZMQ_HAUSNUMERO + 10)
#define ECONNREFUSED   (ZMQ_HAUSNUMERO + 7)
#define EFSM   (ZMQ_HAUSNUMERO + 51)
#define EINPROGRESS   (ZMQ_HAUSNUMERO + 8)
#define EMTHREAD   (ZMQ_HAUSNUMERO + 54)
#define ENETDOWN   (ZMQ_HAUSNUMERO + 4)
#define ENOBUFS   (ZMQ_HAUSNUMERO + 3)
#define ENOCOMPATPROTO   (ZMQ_HAUSNUMERO + 52)
#define ENOTSOCK   (ZMQ_HAUSNUMERO + 9)
#define ENOTSUP   (ZMQ_HAUSNUMERO + 1)
#define EPROTONOSUPPORT   (ZMQ_HAUSNUMERO + 2)
#define ETERM   (ZMQ_HAUSNUMERO + 53)
#define ZMQ_AFFINITY   4
#define ZMQ_BACKLOG   19
#define ZMQ_DEALER   ZMQ_XREQ
#define ZMQ_DONTWAIT   1
#define ZMQ_EVENTS   15
#define ZMQ_EXPORT
#define ZMQ_FD   14
#define ZMQ_HAUSNUMERO   156384712
#define ZMQ_IDENTITY   5
#define ZMQ_IPV4ONLY   31
#define ZMQ_LINGER   17
#define ZMQ_MAKE_VERSION(major, minor, patch)   ((major) * 10000 + (minor) * 100 + (patch))
#define ZMQ_MAXMSGSIZE   22
#define ZMQ_MORE   1
#define ZMQ_MULTICAST_HOPS   25
#define ZMQ_PAIR   0
#define ZMQ_POLLERR   4
#define ZMQ_POLLIN   1
#define ZMQ_POLLOUT   2
#define ZMQ_PUB   1
#define ZMQ_PULL   7
#define ZMQ_PUSH   8
#define ZMQ_RATE   8
#define ZMQ_RCVBUF   12
#define ZMQ_RCVHWM   24
#define ZMQ_RCVMORE   13
#define ZMQ_RCVTIMEO   27
#define ZMQ_RECONNECT_IVL   18
#define ZMQ_RECONNECT_IVL_MAX   21
#define ZMQ_RECOVERY_IVL   9
#define ZMQ_REP   4
#define ZMQ_REQ   3
#define ZMQ_ROUTER   ZMQ_XREP
#define ZMQ_SNDBUF   11
#define ZMQ_SNDHWM   23
#define ZMQ_SNDMORE   2
#define ZMQ_SNDTIMEO   28
#define ZMQ_SUB   2
#define ZMQ_SUBSCRIBE   6
#define ZMQ_TYPE   16
#define ZMQ_UNSUBSCRIBE   7
#define ZMQ_VERSION   ZMQ_MAKE_VERSION(ZMQ_VERSION_MAJOR, ZMQ_VERSION_MINOR, ZMQ_VERSION_PATCH)
#define ZMQ_VERSION_MAJOR   3
#define ZMQ_VERSION_MINOR   1
#define ZMQ_VERSION_PATCH   0
#define ZMQ_XPUB   9
#define ZMQ_XREP   6
#define ZMQ_XREQ   5
#define ZMQ_XSUB   10

Typedefs

typedef void( zmq_free_fn )(void *data, void *hint)

Functions

ZMQ_EXPORT int zmq_bind (void *s, const char *addr)
ZMQ_EXPORT int zmq_close (void *s)
ZMQ_EXPORT int zmq_connect (void *s, const char *addr)
ZMQ_EXPORT int zmq_errno (void)
ZMQ_EXPORT int zmq_getmsgopt (zmq_msg_t *msg, int option, void *optval, size_t *optvallen)
ZMQ_EXPORT int zmq_getsockopt (void *s, int option, void *optval, size_t *optvallen)
ZMQ_EXPORT void * zmq_init (int io_threads)
ZMQ_EXPORT int zmq_msg_close (zmq_msg_t *msg)
ZMQ_EXPORT int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src)
ZMQ_EXPORT void * zmq_msg_data (zmq_msg_t *msg)
ZMQ_EXPORT int zmq_msg_init (zmq_msg_t *msg)
ZMQ_EXPORT int zmq_msg_init_data (zmq_msg_t *msg, void *data, size_t size, zmq_free_fn *ffn, void *hint)
ZMQ_EXPORT int zmq_msg_init_size (zmq_msg_t *msg, size_t size)
ZMQ_EXPORT int zmq_msg_move (zmq_msg_t *dest, zmq_msg_t *src)
ZMQ_EXPORT size_t zmq_msg_size (zmq_msg_t *msg)
ZMQ_EXPORT int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout)
ZMQ_EXPORT int zmq_recv (void *s, void *buf, size_t len, int flags)
ZMQ_EXPORT int zmq_recvmsg (void *s, zmq_msg_t *msg, int flags)
ZMQ_EXPORT int zmq_send (void *s, const void *buf, size_t len, int flags)
ZMQ_EXPORT int zmq_sendmsg (void *s, zmq_msg_t *msg, int flags)
ZMQ_EXPORT int zmq_setsockopt (void *s, int option, const void *optval, size_t optvallen)
ZMQ_EXPORT void * zmq_socket (void *context, int type)
ZMQ_EXPORT const char * zmq_strerror (int errnum)
ZMQ_EXPORT int zmq_term (void *context)
ZMQ_EXPORT void zmq_version (int *major, int *minor, int *patch)

Define Documentation

#define EADDRINUSE   (ZMQ_HAUSNUMERO + 5)

Definition at line 92 of file zmq.h.

Referenced by zmq::ctx_t::register_endpoint().

#define EADDRNOTAVAIL   (ZMQ_HAUSNUMERO + 6)

Definition at line 95 of file zmq.h.

#define EAFNOSUPPORT   (ZMQ_HAUSNUMERO + 10)

Definition at line 107 of file zmq.h.

Referenced by zmq::tcp_listener_t::set_address().

#define ECONNREFUSED   (ZMQ_HAUSNUMERO + 7)
#define EFSM   (ZMQ_HAUSNUMERO + 51)

Definition at line 111 of file zmq.h.

Referenced by zmq::req_t::xrecv(), zmq::rep_t::xrecv(), zmq::req_t::xsend(), and zmq::rep_t::xsend().

#define EINPROGRESS   (ZMQ_HAUSNUMERO + 8)

Definition at line 101 of file zmq.h.

Referenced by zmq::tcp_connecter_t::open().

#define EMTHREAD   (ZMQ_HAUSNUMERO + 54)

Definition at line 114 of file zmq.h.

Referenced by zmq::socket_base_t::bind(), and zmq::socket_base_t::connect().

#define ENETDOWN   (ZMQ_HAUSNUMERO + 4)

Definition at line 89 of file zmq.h.

Referenced by zmq::tcp_connecter_t::connect(), and zmq::ipc_connecter_t::connect().

#define ENOBUFS   (ZMQ_HAUSNUMERO + 3)

Definition at line 86 of file zmq.h.

Referenced by zmq::tcp_listener_t::accept(), and zmq::ipc_listener_t::accept().

#define ENOCOMPATPROTO   (ZMQ_HAUSNUMERO + 52)

Definition at line 112 of file zmq.h.

Referenced by zmq::socket_base_t::check_protocol().

#define ENOTSOCK   (ZMQ_HAUSNUMERO + 9)
#define ENOTSUP   (ZMQ_HAUSNUMERO + 1)
#define EPROTONOSUPPORT   (ZMQ_HAUSNUMERO + 2)

Definition at line 83 of file zmq.h.

Referenced by zmq::socket_base_t::check_protocol().

#define ETERM   (ZMQ_HAUSNUMERO + 53)
#define ZMQ_AFFINITY   4

Definition at line 173 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), and zmq::options_t::setsockopt().

#define ZMQ_BACKLOG   19

Definition at line 187 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), and zmq::options_t::setsockopt().

#define ZMQ_DEALER   ZMQ_XREQ

Definition at line 170 of file zmq.h.

#define ZMQ_DONTWAIT   1
#define ZMQ_EVENTS   15

Definition at line 183 of file zmq.h.

Referenced by zmq::socket_base_t::getsockopt(), and zmq_poll().

#define ZMQ_EXPORT

Definition at line 49 of file zmq.h.

#define ZMQ_FD   14

Definition at line 182 of file zmq.h.

Referenced by zmq::socket_base_t::getsockopt(), and zmq_poll().

#define ZMQ_HAUSNUMERO   156384712

Definition at line 76 of file zmq.h.

#define ZMQ_IDENTITY   5

Definition at line 174 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), and zmq::options_t::setsockopt().

#define ZMQ_IPV4ONLY   31

Definition at line 195 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), and zmq::options_t::setsockopt().

#define ZMQ_LINGER   17

Definition at line 185 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), main(), and zmq::options_t::setsockopt().

#define ZMQ_MAKE_VERSION (   major,
  minor,
  patch 
)    ((major) * 10000 + (minor) * 100 + (patch))

Definition at line 62 of file zmq.h.

#define ZMQ_MAXMSGSIZE   22

Definition at line 189 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), and zmq::options_t::setsockopt().

#define ZMQ_MORE   1

Definition at line 198 of file zmq.h.

Referenced by main(), and zmq_getmsgopt().

#define ZMQ_MULTICAST_HOPS   25

Definition at line 192 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), and zmq::options_t::setsockopt().

#define ZMQ_PAIR   0
#define ZMQ_POLLERR   4

Definition at line 223 of file zmq.h.

Referenced by zmq_poll().

#define ZMQ_POLLIN   1

Definition at line 221 of file zmq.h.

Referenced by zmq::socket_base_t::getsockopt(), and zmq_poll().

#define ZMQ_POLLOUT   2

Definition at line 222 of file zmq.h.

Referenced by zmq::socket_base_t::getsockopt(), and zmq_poll().

#define ZMQ_PUB   1
#define ZMQ_PULL   7
#define ZMQ_PUSH   8
#define ZMQ_RATE   8

Definition at line 177 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), and zmq::options_t::setsockopt().

#define ZMQ_RCVBUF   12

Definition at line 180 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), and zmq::options_t::setsockopt().

#define ZMQ_RCVHWM   24

Definition at line 191 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), main(), and zmq::options_t::setsockopt().

#define ZMQ_RCVMORE   13

Definition at line 181 of file zmq.h.

Referenced by bounce(), zmq::socket_base_t::getsockopt(), and main().

#define ZMQ_RCVTIMEO   27

Definition at line 193 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), main(), and zmq::options_t::setsockopt().

#define ZMQ_RECONNECT_IVL   18

Definition at line 186 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), and zmq::options_t::setsockopt().

#define ZMQ_RECONNECT_IVL_MAX   21

Definition at line 188 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), and zmq::options_t::setsockopt().

#define ZMQ_RECOVERY_IVL   9

Definition at line 178 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), and zmq::options_t::setsockopt().

#define ZMQ_REP   4
#define ZMQ_REQ   3
#define ZMQ_ROUTER   ZMQ_XREP

Definition at line 169 of file zmq.h.

#define ZMQ_SNDBUF   11

Definition at line 179 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), and zmq::options_t::setsockopt().

#define ZMQ_SNDHWM   23

Definition at line 190 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), main(), and zmq::options_t::setsockopt().

#define ZMQ_SNDMORE   2

Definition at line 202 of file zmq.h.

Referenced by bounce(), main(), zmq::socket_base_t::send(), and zmq::pair_t::xsend().

#define ZMQ_SNDTIMEO   28

Definition at line 194 of file zmq.h.

Referenced by zmq::options_t::getsockopt(), main(), and zmq::options_t::setsockopt().

#define ZMQ_SUB   2
#define ZMQ_SUBSCRIBE   6

Definition at line 175 of file zmq.h.

Referenced by main(), and zmq::sub_t::xsetsockopt().

#define ZMQ_TYPE   16

Definition at line 184 of file zmq.h.

Referenced by zmq::options_t::getsockopt().

#define ZMQ_UNSUBSCRIBE   7

Definition at line 176 of file zmq.h.

Referenced by zmq::sub_t::xsetsockopt().

#define ZMQ_VERSION   ZMQ_MAKE_VERSION(ZMQ_VERSION_MAJOR, ZMQ_VERSION_MINOR, ZMQ_VERSION_PATCH)

Definition at line 64 of file zmq.h.

#define ZMQ_VERSION_MAJOR   3

Definition at line 58 of file zmq.h.

Referenced by zmq_version().

#define ZMQ_VERSION_MINOR   1

Definition at line 59 of file zmq.h.

Referenced by zmq_version().

#define ZMQ_VERSION_PATCH   0

Definition at line 60 of file zmq.h.

Referenced by zmq_version().

#define ZMQ_XPUB   9
#define ZMQ_XREP   6
#define ZMQ_XREQ   5
#define ZMQ_XSUB   10

Typedef Documentation

typedef void( zmq_free_fn)(void *data, void *hint)

Definition at line 131 of file zmq.h.


Function Documentation

ZMQ_EXPORT 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:

ZMQ_EXPORT 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:

ZMQ_EXPORT 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:

ZMQ_EXPORT int zmq_errno ( void  )

Definition at line 714 of file zmq.cpp.

Referenced by main().

Here is the caller graph for this function:

ZMQ_EXPORT 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:

ZMQ_EXPORT 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:

ZMQ_EXPORT 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:

ZMQ_EXPORT 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:

ZMQ_EXPORT int zmq_msg_copy ( zmq_msg_t dest,
zmq_msg_t src 
)

Definition at line 328 of file zmq.cpp.

ZMQ_EXPORT 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:

ZMQ_EXPORT 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:

ZMQ_EXPORT 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.

ZMQ_EXPORT 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:

ZMQ_EXPORT int zmq_msg_move ( zmq_msg_t dest,
zmq_msg_t src 
)

Definition at line 323 of file zmq.cpp.

ZMQ_EXPORT 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:

ZMQ_EXPORT int zmq_poll ( zmq_pollitem_t items,
int  nitems,
long  timeout 
)
ZMQ_EXPORT 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:

ZMQ_EXPORT 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:

ZMQ_EXPORT 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:

ZMQ_EXPORT 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:

ZMQ_EXPORT 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:

ZMQ_EXPORT void* zmq_socket ( void *  context,
int  type 
)

Definition at line 171 of file zmq.cpp.

Referenced by main(), and worker().

Here is the caller graph for this function:

ZMQ_EXPORT 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:

ZMQ_EXPORT int zmq_term ( void *  context)

Definition at line 145 of file zmq.cpp.

References zmq_assert.

Referenced by main().

Here is the caller graph for this function:

ZMQ_EXPORT 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