diff options
author | Martin Lucina <martin@lucina.net> | 2012-01-23 08:53:35 +0100 |
---|---|---|
committer | Martin Lucina <martin@lucina.net> | 2012-01-23 08:53:35 +0100 |
commit | e645fc2693acc796304498909786b7b47005b429 (patch) | |
tree | 4118cd4c7b9eba3ba1d6892800c79669ea94c4e9 /include/zmq.h | |
parent | 2c416a793ea781273a5da6742211f5f01af13a2b (diff) |
Imported Upstream version 2.1.3upstream/2.1.3
Diffstat (limited to 'include/zmq.h')
-rw-r--r-- | include/zmq.h | 49 |
1 files changed, 34 insertions, 15 deletions
diff --git a/include/zmq.h b/include/zmq.h index 1cb6c03..6cdb085 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -1,19 +1,20 @@ /* - Copyright (c) 2007-2010 iMatix Corporation + Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under - the terms of the Lesser GNU General Public License as published by + the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - Lesser GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the Lesser GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -30,7 +31,7 @@ extern "C" { #include "winsock2.h" #endif -/* Win32 needs special handling for DLL exports */ +/* Handle DSO symbol visibility */ #if defined _WIN32 # if defined DLL_EXPORT # define ZMQ_EXPORT __declspec(dllexport) @@ -38,7 +39,13 @@ extern "C" { # define ZMQ_EXPORT __declspec(dllimport) # endif #else -# define ZMQ_EXPORT +# if defined __SUNPRO_C || defined __SUNPRO_CC +# define ZMQ_EXPORT __global +# elif (defined __GNUC__ && __GNUC__ >= 4) || defined __INTEL_COMPILER +# define ZMQ_EXPORT __attribute__ ((visibility("default"))) +# else +# define ZMQ_EXPORT +# endif #endif /******************************************************************************/ @@ -47,8 +54,8 @@ extern "C" { /* Version macros for compile-time API version detection */ #define ZMQ_VERSION_MAJOR 2 -#define ZMQ_VERSION_MINOR 0 -#define ZMQ_VERSION_PATCH 10 +#define ZMQ_VERSION_MINOR 1 +#define ZMQ_VERSION_PATCH 3 #define ZMQ_MAKE_VERSION(major, minor, patch) \ ((major) * 10000 + (minor) * 100 + (patch)) @@ -62,7 +69,7 @@ ZMQ_EXPORT void zmq_version (int *major, int *minor, int *patch); /* 0MQ errors. */ /******************************************************************************/ -/* A number random anough not to collide with different errno ranges on */ +/* A number random enough not to collide with different errno ranges on */ /* different OSes. The assumption is that error_t is at least 32-bit type. */ #define ZMQ_HAUSNUMERO 156384712 @@ -93,16 +100,16 @@ ZMQ_EXPORT void zmq_version (int *major, int *minor, int *patch); #endif /* Native 0MQ error codes. */ -#define EMTHREAD (ZMQ_HAUSNUMERO + 50) #define EFSM (ZMQ_HAUSNUMERO + 51) #define ENOCOMPATPROTO (ZMQ_HAUSNUMERO + 52) #define ETERM (ZMQ_HAUSNUMERO + 53) +#define EMTHREAD (ZMQ_HAUSNUMERO + 54) /* This function retrieves the errno as it is known to 0MQ library. The goal */ /* of this function is to make the code 100% portable, including where 0MQ */ /* compiled with certain CRT library (on Windows) is linked to an */ /* application that uses different CRT library. */ -ZMQ_EXPORT int zmq_errno (); +ZMQ_EXPORT int zmq_errno (void); /* Resolves system errors and 0MQ errors to human-readable string. */ ZMQ_EXPORT const char *zmq_strerror (int errnum); @@ -168,10 +175,14 @@ ZMQ_EXPORT int zmq_term (void *context); #define ZMQ_SUB 2 #define ZMQ_REQ 3 #define ZMQ_REP 4 -#define ZMQ_XREQ 5 -#define ZMQ_XREP 6 +#define ZMQ_DEALER 5 +#define ZMQ_ROUTER 6 #define ZMQ_PULL 7 #define ZMQ_PUSH 8 +#define ZMQ_XPUB 9 +#define ZMQ_XSUB 10 +#define ZMQ_XREQ ZMQ_DEALER /* Old alias, remove in 3.x */ +#define ZMQ_XREP ZMQ_ROUTER /* Old alias, remove in 3.x */ #define ZMQ_UPSTREAM ZMQ_PULL /* Old alias, remove in 3.x */ #define ZMQ_DOWNSTREAM ZMQ_PUSH /* Old alias, remove in 3.x */ @@ -188,7 +199,15 @@ ZMQ_EXPORT int zmq_term (void *context); #define ZMQ_SNDBUF 11 #define ZMQ_RCVBUF 12 #define ZMQ_RCVMORE 13 - +#define ZMQ_FD 14 +#define ZMQ_EVENTS 15 +#define ZMQ_TYPE 16 +#define ZMQ_LINGER 17 +#define ZMQ_RECONNECT_IVL 18 +#define ZMQ_BACKLOG 19 +#define ZMQ_RECOVERY_IVL_MSEC 20 /* opt. recovery time, reconcile in 3.x */ +#define ZMQ_RECONNECT_IVL_MAX 21 + /* Send/recv options. */ #define ZMQ_NOBLOCK 1 #define ZMQ_SNDMORE 2 @@ -227,7 +246,7 @@ typedef struct ZMQ_EXPORT int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout); /******************************************************************************/ -/* Devices - Experimental. */ +/* Built-in devices */ /******************************************************************************/ #define ZMQ_STREAMER 1 |