annotate zmq.h @ 245:b1dc2ba9a315

Revise dedrift automatic slope update disable logic
author Daniele Nicolodi <daniele@grinta.net>
date Thu, 26 Feb 2015 23:11:01 +0100
parents 65ab87e5a8d6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
241
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
1 /*
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
2 Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
3
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
4 This file is part of 0MQ.
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
5
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
6 0MQ is free software; you can redistribute it and/or modify it under
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
7 the terms of the GNU Lesser General Public License as published by
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
8 the Free Software Foundation; either version 3 of the License, or
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
9 (at your option) any later version.
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
10
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
11 0MQ is distributed in the hope that it will be useful,
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
14 GNU Lesser General Public License for more details.
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
15
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
16 You should have received a copy of the GNU Lesser General Public License
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
18
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
19 *************************************************************************
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
20 NOTE to contributors. This file comprises the principal public contract
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
21 for ZeroMQ API users (along with zmq_utils.h). Any change to this file
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
22 supplied in a stable release SHOULD not break existing applications.
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
23 In practice this means that the value of constants must not change, and
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
24 that old values may not be reused for new constants.
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
25 *************************************************************************
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
26 */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
27
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
28 #ifndef __ZMQ_H_INCLUDED__
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
29 #define __ZMQ_H_INCLUDED__
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
30
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
31 /* Version macros for compile-time API version detection */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
32 #define ZMQ_VERSION_MAJOR 4
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
33 #define ZMQ_VERSION_MINOR 0
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
34 #define ZMQ_VERSION_PATCH 4
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
35
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
36 #define ZMQ_MAKE_VERSION(major, minor, patch) \
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
37 ((major) * 10000 + (minor) * 100 + (patch))
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
38 #define ZMQ_VERSION \
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
39 ZMQ_MAKE_VERSION(ZMQ_VERSION_MAJOR, ZMQ_VERSION_MINOR, ZMQ_VERSION_PATCH)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
40
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
41 #ifdef __cplusplus
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
42 extern "C" {
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
43 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
44
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
45 #if !defined _WIN32_WCE
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
46 #include <errno.h>
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
47 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
48 #include <stddef.h>
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
49 #include <stdio.h>
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
50 #if defined _WIN32
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
51 #include <winsock2.h>
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
52 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
53
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
54 /* Handle DSO symbol visibility */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
55 #if defined _WIN32
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
56 # if defined ZMQ_STATIC
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
57 # define ZMQ_EXPORT
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
58 # elif defined DLL_EXPORT
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
59 # define ZMQ_EXPORT __declspec(dllexport)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
60 # else
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
61 # define ZMQ_EXPORT __declspec(dllimport)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
62 # endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
63 #else
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
64 # if defined __SUNPRO_C || defined __SUNPRO_CC
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
65 # define ZMQ_EXPORT __global
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
66 # elif (defined __GNUC__ && __GNUC__ >= 4) || defined __INTEL_COMPILER
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
67 # define ZMQ_EXPORT __attribute__ ((visibility("default")))
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
68 # else
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
69 # define ZMQ_EXPORT
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
70 # endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
71 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
72
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
73 /* Define integer types needed for event interface */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
74 #if defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_OPENVMS
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
75 # include <inttypes.h>
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
76 #elif defined _MSC_VER && _MSC_VER < 1600
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
77 # ifndef int32_t
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
78 typedef __int32 int32_t;
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
79 # endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
80 # ifndef uint16_t
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
81 typedef unsigned __int16 uint16_t;
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
82 # endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
83 # ifndef uint8_t
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
84 typedef unsigned __int8 uint8_t;
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
85 # endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
86 #else
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
87 # include <stdint.h>
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
88 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
89
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
90
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
91 /******************************************************************************/
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
92 /* 0MQ errors. */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
93 /******************************************************************************/
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
94
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
95 /* A number random enough not to collide with different errno ranges on */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
96 /* different OSes. The assumption is that error_t is at least 32-bit type. */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
97 #define ZMQ_HAUSNUMERO 156384712
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
98
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
99 /* On Windows platform some of the standard POSIX errnos are not defined. */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
100 #ifndef ENOTSUP
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
101 #define ENOTSUP (ZMQ_HAUSNUMERO + 1)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
102 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
103 #ifndef EPROTONOSUPPORT
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
104 #define EPROTONOSUPPORT (ZMQ_HAUSNUMERO + 2)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
105 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
106 #ifndef ENOBUFS
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
107 #define ENOBUFS (ZMQ_HAUSNUMERO + 3)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
108 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
109 #ifndef ENETDOWN
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
110 #define ENETDOWN (ZMQ_HAUSNUMERO + 4)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
111 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
112 #ifndef EADDRINUSE
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
113 #define EADDRINUSE (ZMQ_HAUSNUMERO + 5)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
114 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
115 #ifndef EADDRNOTAVAIL
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
116 #define EADDRNOTAVAIL (ZMQ_HAUSNUMERO + 6)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
117 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
118 #ifndef ECONNREFUSED
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
119 #define ECONNREFUSED (ZMQ_HAUSNUMERO + 7)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
120 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
121 #ifndef EINPROGRESS
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
122 #define EINPROGRESS (ZMQ_HAUSNUMERO + 8)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
123 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
124 #ifndef ENOTSOCK
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
125 #define ENOTSOCK (ZMQ_HAUSNUMERO + 9)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
126 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
127 #ifndef EMSGSIZE
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
128 #define EMSGSIZE (ZMQ_HAUSNUMERO + 10)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
129 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
130 #ifndef EAFNOSUPPORT
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
131 #define EAFNOSUPPORT (ZMQ_HAUSNUMERO + 11)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
132 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
133 #ifndef ENETUNREACH
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
134 #define ENETUNREACH (ZMQ_HAUSNUMERO + 12)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
135 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
136 #ifndef ECONNABORTED
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
137 #define ECONNABORTED (ZMQ_HAUSNUMERO + 13)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
138 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
139 #ifndef ECONNRESET
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
140 #define ECONNRESET (ZMQ_HAUSNUMERO + 14)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
141 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
142 #ifndef ENOTCONN
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
143 #define ENOTCONN (ZMQ_HAUSNUMERO + 15)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
144 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
145 #ifndef ETIMEDOUT
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
146 #define ETIMEDOUT (ZMQ_HAUSNUMERO + 16)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
147 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
148 #ifndef EHOSTUNREACH
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
149 #define EHOSTUNREACH (ZMQ_HAUSNUMERO + 17)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
150 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
151 #ifndef ENETRESET
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
152 #define ENETRESET (ZMQ_HAUSNUMERO + 18)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
153 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
154
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
155 /* Native 0MQ error codes. */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
156 #define EFSM (ZMQ_HAUSNUMERO + 51)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
157 #define ENOCOMPATPROTO (ZMQ_HAUSNUMERO + 52)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
158 #define ETERM (ZMQ_HAUSNUMERO + 53)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
159 #define EMTHREAD (ZMQ_HAUSNUMERO + 54)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
160
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
161 /* Run-time API version detection */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
162 ZMQ_EXPORT void zmq_version (int *major, int *minor, int *patch);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
163
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
164 /* This function retrieves the errno as it is known to 0MQ library. The goal */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
165 /* of this function is to make the code 100% portable, including where 0MQ */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
166 /* compiled with certain CRT library (on Windows) is linked to an */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
167 /* application that uses different CRT library. */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
168 ZMQ_EXPORT int zmq_errno (void);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
169
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
170 /* Resolves system errors and 0MQ errors to human-readable string. */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
171 ZMQ_EXPORT const char *zmq_strerror (int errnum);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
172
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
173 /******************************************************************************/
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
174 /* 0MQ infrastructure (a.k.a. context) initialisation & termination. */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
175 /******************************************************************************/
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
176
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
177 /* New API */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
178 /* Context options */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
179 #define ZMQ_IO_THREADS 1
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
180 #define ZMQ_MAX_SOCKETS 2
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
181
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
182 /* Default for new contexts */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
183 #define ZMQ_IO_THREADS_DFLT 1
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
184 #define ZMQ_MAX_SOCKETS_DFLT 1023
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
185
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
186 ZMQ_EXPORT void *zmq_ctx_new (void);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
187 ZMQ_EXPORT int zmq_ctx_term (void *context);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
188 ZMQ_EXPORT int zmq_ctx_shutdown (void *ctx_);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
189 ZMQ_EXPORT int zmq_ctx_set (void *context, int option, int optval);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
190 ZMQ_EXPORT int zmq_ctx_get (void *context, int option);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
191
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
192 /* Old (legacy) API */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
193 ZMQ_EXPORT void *zmq_init (int io_threads);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
194 ZMQ_EXPORT int zmq_term (void *context);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
195 ZMQ_EXPORT int zmq_ctx_destroy (void *context);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
196
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
197
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
198 /******************************************************************************/
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
199 /* 0MQ message definition. */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
200 /******************************************************************************/
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
201
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
202 typedef struct zmq_msg_t {unsigned char _ [32];} zmq_msg_t;
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
203
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
204 typedef void (zmq_free_fn) (void *data, void *hint);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
205
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
206 ZMQ_EXPORT int zmq_msg_init (zmq_msg_t *msg);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
207 ZMQ_EXPORT int zmq_msg_init_size (zmq_msg_t *msg, size_t size);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
208 ZMQ_EXPORT int zmq_msg_init_data (zmq_msg_t *msg, void *data,
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
209 size_t size, zmq_free_fn *ffn, void *hint);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
210 ZMQ_EXPORT int zmq_msg_send (zmq_msg_t *msg, void *s, int flags);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
211 ZMQ_EXPORT int zmq_msg_recv (zmq_msg_t *msg, void *s, int flags);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
212 ZMQ_EXPORT int zmq_msg_close (zmq_msg_t *msg);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
213 ZMQ_EXPORT int zmq_msg_move (zmq_msg_t *dest, zmq_msg_t *src);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
214 ZMQ_EXPORT int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
215 ZMQ_EXPORT void *zmq_msg_data (zmq_msg_t *msg);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
216 ZMQ_EXPORT size_t zmq_msg_size (zmq_msg_t *msg);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
217 ZMQ_EXPORT int zmq_msg_more (zmq_msg_t *msg);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
218 ZMQ_EXPORT int zmq_msg_get (zmq_msg_t *msg, int option);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
219 ZMQ_EXPORT int zmq_msg_set (zmq_msg_t *msg, int option, int optval);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
220
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
221
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
222 /******************************************************************************/
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
223 /* 0MQ socket definition. */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
224 /******************************************************************************/
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
225
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
226 /* Socket types. */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
227 #define ZMQ_PAIR 0
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
228 #define ZMQ_PUB 1
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
229 #define ZMQ_SUB 2
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
230 #define ZMQ_REQ 3
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
231 #define ZMQ_REP 4
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
232 #define ZMQ_DEALER 5
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
233 #define ZMQ_ROUTER 6
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
234 #define ZMQ_PULL 7
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
235 #define ZMQ_PUSH 8
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
236 #define ZMQ_XPUB 9
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
237 #define ZMQ_XSUB 10
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
238 #define ZMQ_STREAM 11
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
239
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
240 /* Deprecated aliases */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
241 #define ZMQ_XREQ ZMQ_DEALER
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
242 #define ZMQ_XREP ZMQ_ROUTER
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
243
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
244 /* Socket options. */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
245 #define ZMQ_AFFINITY 4
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
246 #define ZMQ_IDENTITY 5
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
247 #define ZMQ_SUBSCRIBE 6
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
248 #define ZMQ_UNSUBSCRIBE 7
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
249 #define ZMQ_RATE 8
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
250 #define ZMQ_RECOVERY_IVL 9
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
251 #define ZMQ_SNDBUF 11
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
252 #define ZMQ_RCVBUF 12
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
253 #define ZMQ_RCVMORE 13
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
254 #define ZMQ_FD 14
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
255 #define ZMQ_EVENTS 15
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
256 #define ZMQ_TYPE 16
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
257 #define ZMQ_LINGER 17
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
258 #define ZMQ_RECONNECT_IVL 18
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
259 #define ZMQ_BACKLOG 19
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
260 #define ZMQ_RECONNECT_IVL_MAX 21
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
261 #define ZMQ_MAXMSGSIZE 22
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
262 #define ZMQ_SNDHWM 23
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
263 #define ZMQ_RCVHWM 24
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
264 #define ZMQ_MULTICAST_HOPS 25
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
265 #define ZMQ_RCVTIMEO 27
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
266 #define ZMQ_SNDTIMEO 28
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
267 #define ZMQ_LAST_ENDPOINT 32
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
268 #define ZMQ_ROUTER_MANDATORY 33
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
269 #define ZMQ_TCP_KEEPALIVE 34
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
270 #define ZMQ_TCP_KEEPALIVE_CNT 35
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
271 #define ZMQ_TCP_KEEPALIVE_IDLE 36
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
272 #define ZMQ_TCP_KEEPALIVE_INTVL 37
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
273 #define ZMQ_TCP_ACCEPT_FILTER 38
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
274 #define ZMQ_IMMEDIATE 39
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
275 #define ZMQ_XPUB_VERBOSE 40
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
276 #define ZMQ_ROUTER_RAW 41
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
277 #define ZMQ_IPV6 42
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
278 #define ZMQ_MECHANISM 43
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
279 #define ZMQ_PLAIN_SERVER 44
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
280 #define ZMQ_PLAIN_USERNAME 45
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
281 #define ZMQ_PLAIN_PASSWORD 46
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
282 #define ZMQ_CURVE_SERVER 47
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
283 #define ZMQ_CURVE_PUBLICKEY 48
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
284 #define ZMQ_CURVE_SECRETKEY 49
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
285 #define ZMQ_CURVE_SERVERKEY 50
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
286 #define ZMQ_PROBE_ROUTER 51
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
287 #define ZMQ_REQ_CORRELATE 52
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
288 #define ZMQ_REQ_RELAXED 53
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
289 #define ZMQ_CONFLATE 54
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
290 #define ZMQ_ZAP_DOMAIN 55
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
291
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
292 /* Message options */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
293 #define ZMQ_MORE 1
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
294
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
295 /* Send/recv options. */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
296 #define ZMQ_DONTWAIT 1
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
297 #define ZMQ_SNDMORE 2
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
298
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
299 /* Security mechanisms */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
300 #define ZMQ_NULL 0
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
301 #define ZMQ_PLAIN 1
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
302 #define ZMQ_CURVE 2
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
303
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
304 /* Deprecated options and aliases */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
305 #define ZMQ_IPV4ONLY 31
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
306 #define ZMQ_DELAY_ATTACH_ON_CONNECT ZMQ_IMMEDIATE
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
307 #define ZMQ_NOBLOCK ZMQ_DONTWAIT
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
308 #define ZMQ_FAIL_UNROUTABLE ZMQ_ROUTER_MANDATORY
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
309 #define ZMQ_ROUTER_BEHAVIOR ZMQ_ROUTER_MANDATORY
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
310
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
311 /******************************************************************************/
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
312 /* 0MQ socket events and monitoring */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
313 /******************************************************************************/
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
314
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
315 /* Socket transport events (tcp and ipc only) */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
316 #define ZMQ_EVENT_CONNECTED 1
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
317 #define ZMQ_EVENT_CONNECT_DELAYED 2
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
318 #define ZMQ_EVENT_CONNECT_RETRIED 4
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
319
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
320 #define ZMQ_EVENT_LISTENING 8
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
321 #define ZMQ_EVENT_BIND_FAILED 16
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
322
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
323 #define ZMQ_EVENT_ACCEPTED 32
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
324 #define ZMQ_EVENT_ACCEPT_FAILED 64
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
325
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
326 #define ZMQ_EVENT_CLOSED 128
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
327 #define ZMQ_EVENT_CLOSE_FAILED 256
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
328 #define ZMQ_EVENT_DISCONNECTED 512
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
329 #define ZMQ_EVENT_MONITOR_STOPPED 1024
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
330
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
331 #define ZMQ_EVENT_ALL ( ZMQ_EVENT_CONNECTED | ZMQ_EVENT_CONNECT_DELAYED | \
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
332 ZMQ_EVENT_CONNECT_RETRIED | ZMQ_EVENT_LISTENING | \
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
333 ZMQ_EVENT_BIND_FAILED | ZMQ_EVENT_ACCEPTED | \
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
334 ZMQ_EVENT_ACCEPT_FAILED | ZMQ_EVENT_CLOSED | \
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
335 ZMQ_EVENT_CLOSE_FAILED | ZMQ_EVENT_DISCONNECTED | \
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
336 ZMQ_EVENT_MONITOR_STOPPED)
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
337
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
338 /* Socket event data */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
339 typedef struct {
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
340 uint16_t event; // id of the event as bitfield
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
341 int32_t value ; // value is either error code, fd or reconnect interval
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
342 } zmq_event_t;
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
343
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
344 ZMQ_EXPORT void *zmq_socket (void *, int type);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
345 ZMQ_EXPORT int zmq_close (void *s);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
346 ZMQ_EXPORT int zmq_setsockopt (void *s, int option, const void *optval,
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
347 size_t optvallen);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
348 ZMQ_EXPORT int zmq_getsockopt (void *s, int option, void *optval,
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
349 size_t *optvallen);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
350 ZMQ_EXPORT int zmq_bind (void *s, const char *addr);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
351 ZMQ_EXPORT int zmq_connect (void *s, const char *addr);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
352 ZMQ_EXPORT int zmq_unbind (void *s, const char *addr);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
353 ZMQ_EXPORT int zmq_disconnect (void *s, const char *addr);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
354 ZMQ_EXPORT int zmq_send (void *s, const void *buf, size_t len, int flags);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
355 ZMQ_EXPORT int zmq_send_const (void *s, const void *buf, size_t len, int flags);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
356 ZMQ_EXPORT int zmq_recv (void *s, void *buf, size_t len, int flags);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
357 ZMQ_EXPORT int zmq_socket_monitor (void *s, const char *addr, int events);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
358
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
359 ZMQ_EXPORT int zmq_sendmsg (void *s, zmq_msg_t *msg, int flags);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
360 ZMQ_EXPORT int zmq_recvmsg (void *s, zmq_msg_t *msg, int flags);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
361
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
362 /* Experimental */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
363 struct iovec;
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
364
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
365 ZMQ_EXPORT int zmq_sendiov (void *s, struct iovec *iov, size_t count, int flags);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
366 ZMQ_EXPORT int zmq_recviov (void *s, struct iovec *iov, size_t *count, int flags);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
367
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
368 /******************************************************************************/
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
369 /* I/O multiplexing. */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
370 /******************************************************************************/
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
371
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
372 #define ZMQ_POLLIN 1
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
373 #define ZMQ_POLLOUT 2
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
374 #define ZMQ_POLLERR 4
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
375
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
376 typedef struct
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
377 {
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
378 void *socket;
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
379 #if defined _WIN32
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
380 SOCKET fd;
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
381 #else
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
382 int fd;
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
383 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
384 short events;
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
385 short revents;
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
386 } zmq_pollitem_t;
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
387
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
388 #define ZMQ_POLLITEMS_DFLT 16
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
389
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
390 ZMQ_EXPORT int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
391
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
392 /* Built-in message proxy (3-way) */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
393
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
394 ZMQ_EXPORT int zmq_proxy (void *frontend, void *backend, void *capture);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
395
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
396 /* Encode a binary key as printable text using ZMQ RFC 32 */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
397 ZMQ_EXPORT char *zmq_z85_encode (char *dest, uint8_t *data, size_t size);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
398
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
399 /* Encode a binary key from printable text per ZMQ RFC 32 */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
400 ZMQ_EXPORT uint8_t *zmq_z85_decode (uint8_t *dest, char *string);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
401
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
402 /* Deprecated aliases */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
403 #define ZMQ_STREAMER 1
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
404 #define ZMQ_FORWARDER 2
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
405 #define ZMQ_QUEUE 3
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
406 /* Deprecated method */
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
407 ZMQ_EXPORT int zmq_device (int type, void *frontend, void *backend);
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
408
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
409 #undef ZMQ_EXPORT
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
410
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
411 #ifdef __cplusplus
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
412 }
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
413 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
414
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
415 #endif
65ab87e5a8d6 Add ZMQ library
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
416