summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPieter Hintjens <ph@imatix.com>2010-08-04 14:38:56 +0200
committerPieter Hintjens <ph@imatix.com>2010-08-04 14:38:56 +0200
commit11a410b65827a3958fb5f417c29e95c1953a0b42 (patch)
tree61b56b2fe34f2318c4fb3a1c56682aedee295bad /include
parent544b36da68729daffefa8f40d2efed5945851a01 (diff)
Renamed ZMQ_UPSTREAM to ZMQ_PULL, and ZMQ_DOWNSTREAM to ZMQ_PUSH. Left the old
definitions as aliases, to be removed in release 3.0. Also renamed the source files implementing these two socket types. This change does not break existing applications nor bindings, but allows us to fix the documentation and user guide now, rather than keeping the old (confusing) names.
Diffstat (limited to 'include')
-rw-r--r--include/zmq.h61
1 files changed, 32 insertions, 29 deletions
diff --git a/include/zmq.h b/include/zmq.h
index 294b5c4..bce1215 100644
--- a/include/zmq.h
+++ b/include/zmq.h
@@ -152,33 +152,36 @@ ZMQ_EXPORT int zmq_term (void *context);
/******************************************************************************/
/* Socket types. */
-#define ZMQ_PAIR 0
-#define ZMQ_PUB 1
-#define ZMQ_SUB 2
-#define ZMQ_REQ 3
-#define ZMQ_REP 4
-#define ZMQ_XREQ 5
-#define ZMQ_XREP 6
-#define ZMQ_UPSTREAM 7
-#define ZMQ_DOWNSTREAM 8
+#define ZMQ_PAIR 0
+#define ZMQ_PUB 1
+#define ZMQ_SUB 2
+#define ZMQ_REQ 3
+#define ZMQ_REP 4
+#define ZMQ_XREQ 5
+#define ZMQ_XREP 6
+#define ZMQ_PULL 7
+#define ZMQ_PUSH 8
+#define ZMQ_UPSTREAM ZMQ_PULL /* Old alias, remove in 3.x */
+#define ZMQ_DOWNSTREAM ZMQ_PUSH /* Old alias, remove in 3.x */
/* Socket options. */
-#define ZMQ_HWM 1
-#define ZMQ_SWAP 3
-#define ZMQ_AFFINITY 4
-#define ZMQ_IDENTITY 5
-#define ZMQ_SUBSCRIBE 6
-#define ZMQ_UNSUBSCRIBE 7
-#define ZMQ_RATE 8
+#define ZMQ_HWM 1
+/* ZMQ_LWM 2 no longer supported */
+#define ZMQ_SWAP 3
+#define ZMQ_AFFINITY 4
+#define ZMQ_IDENTITY 5
+#define ZMQ_SUBSCRIBE 6
+#define ZMQ_UNSUBSCRIBE 7
+#define ZMQ_RATE 8
#define ZMQ_RECOVERY_IVL 9
-#define ZMQ_MCAST_LOOP 10
-#define ZMQ_SNDBUF 11
-#define ZMQ_RCVBUF 12
-#define ZMQ_RCVMORE 13
+#define ZMQ_MCAST_LOOP 10
+#define ZMQ_SNDBUF 11
+#define ZMQ_RCVBUF 12
+#define ZMQ_RCVMORE 13
/* Send/recv options. */
-#define ZMQ_NOBLOCK 1
-#define ZMQ_SNDMORE 2
+#define ZMQ_NOBLOCK 1
+#define ZMQ_SNDMORE 2
ZMQ_EXPORT void *zmq_socket (void *context, int type);
ZMQ_EXPORT int zmq_close (void *s);
@@ -195,9 +198,9 @@ ZMQ_EXPORT int zmq_recv (void *s, zmq_msg_t *msg, int flags);
/* I/O multiplexing. */
/******************************************************************************/
-#define ZMQ_POLLIN 1
-#define ZMQ_POLLOUT 2
-#define ZMQ_POLLERR 4
+#define ZMQ_POLLIN 1
+#define ZMQ_POLLOUT 2
+#define ZMQ_POLLERR 4
typedef struct
{
@@ -214,12 +217,12 @@ typedef struct
ZMQ_EXPORT int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout);
/******************************************************************************/
-/* Devices - Experimental. */
+/* Devices */
/******************************************************************************/
-#define ZMQ_STREAMER 1
-#define ZMQ_FORWARDER 2
-#define ZMQ_QUEUE 3
+#define ZMQ_QUEUE 1
+#define ZMQ_FORWARDER 2
+#define ZMQ_STREAMER 3
ZMQ_EXPORT int zmq_device (int device, void * insocket, void* outsocket);