czmq-ffi-gen 0.9.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/AUTHORS +1 -0
- data/CHANGES.md +88 -0
- data/Gemfile +2 -0
- data/LICENSE +14 -0
- data/README.md +112 -0
- data/lib/czmq-ffi-gen.rb +7 -0
- data/lib/czmq-ffi-gen/czmq/ffi.rb +1210 -0
- data/lib/czmq-ffi-gen/czmq/ffi/version.rb +15 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zactor.rb +186 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zarmour.rb +286 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zcert.rb +307 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zcertstore.rb +222 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zchunk.rb +388 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zclock.rb +140 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zconfig.rb +442 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zdigest.rb +156 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zdir.rb +283 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zdir_patch.rb +194 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zfile.rb +353 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zframe.rb +359 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zhash.rb +416 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zhashx.rb +659 -0
- data/lib/czmq-ffi-gen/czmq/ffi/ziflist.rb +189 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zlist.rb +365 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zlistx.rb +478 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zloop.rb +396 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zmsg.rb +515 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zpoller.rb +194 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zproc.rb +294 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zsock.rb +3479 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zstr.rb +203 -0
- data/lib/czmq-ffi-gen/czmq/ffi/ztimerset.rb +203 -0
- data/lib/czmq-ffi-gen/czmq/ffi/ztrie.rb +221 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zuuid.rb +227 -0
- data/lib/czmq-ffi-gen/errors.rb +12 -0
- data/lib/czmq-ffi-gen/gem_version.rb +5 -0
- data/lib/czmq-ffi-gen/legacy.rb +16 -0
- data/lib/czmq-ffi-gen/libzmq.rb +18 -0
- data/lib/czmq-ffi-gen/signals.rb +27 -0
- data/lib/czmq-ffi-gen/vendor.rb +5 -0
- data/lib/czmq-ffi-gen/versions.rb +19 -0
- data/vendor/local/bin/inproc_lat.exe +0 -0
- data/vendor/local/bin/inproc_thr.exe +0 -0
- data/vendor/local/bin/libczmq.dll +0 -0
- data/vendor/local/bin/libgcc_s_sjlj-1.dll +0 -0
- data/vendor/local/bin/libstdc++-6.dll +0 -0
- data/vendor/local/bin/libzmq.dll +0 -0
- data/vendor/local/bin/local_lat.exe +0 -0
- data/vendor/local/bin/local_thr.exe +0 -0
- data/vendor/local/bin/remote_lat.exe +0 -0
- data/vendor/local/bin/remote_thr.exe +0 -0
- data/vendor/local/include/czmq.h +31 -0
- data/vendor/local/include/czmq_library.h +199 -0
- data/vendor/local/include/czmq_prelude.h +641 -0
- data/vendor/local/include/readme.txt +83 -0
- data/vendor/local/include/sha1.h +76 -0
- data/vendor/local/include/sha1.inc_c +335 -0
- data/vendor/local/include/slre.h +92 -0
- data/vendor/local/include/slre.inc_c +660 -0
- data/vendor/local/include/zactor.h +76 -0
- data/vendor/local/include/zarmour.h +114 -0
- data/vendor/local/include/zauth.h +100 -0
- data/vendor/local/include/zauth_v2.h +88 -0
- data/vendor/local/include/zbeacon.h +86 -0
- data/vendor/local/include/zbeacon_v2.h +75 -0
- data/vendor/local/include/zcert.h +136 -0
- data/vendor/local/include/zcertstore.h +100 -0
- data/vendor/local/include/zchunk.h +163 -0
- data/vendor/local/include/zclock.h +73 -0
- data/vendor/local/include/zconfig.h +185 -0
- data/vendor/local/include/zctx.h +107 -0
- data/vendor/local/include/zdigest.h +65 -0
- data/vendor/local/include/zdir.h +149 -0
- data/vendor/local/include/zdir_patch.h +82 -0
- data/vendor/local/include/zfile.h +177 -0
- data/vendor/local/include/zframe.h +176 -0
- data/vendor/local/include/zgossip.h +95 -0
- data/vendor/local/include/zgossip_engine.inc +927 -0
- data/vendor/local/include/zgossip_msg.h +129 -0
- data/vendor/local/include/zhash.h +195 -0
- data/vendor/local/include/zhash_primes.inc +329 -0
- data/vendor/local/include/zhashx.h +298 -0
- data/vendor/local/include/ziflist.h +77 -0
- data/vendor/local/include/zlist.h +158 -0
- data/vendor/local/include/zlistx.h +205 -0
- data/vendor/local/include/zloop.h +168 -0
- data/vendor/local/include/zmonitor.h +73 -0
- data/vendor/local/include/zmonitor_v2.h +56 -0
- data/vendor/local/include/zmq.h +617 -0
- data/vendor/local/include/zmq_utils.h +48 -0
- data/vendor/local/include/zmsg.h +280 -0
- data/vendor/local/include/zmutex.h +55 -0
- data/vendor/local/include/zpoller.h +92 -0
- data/vendor/local/include/zproc.h +168 -0
- data/vendor/local/include/zproxy.h +111 -0
- data/vendor/local/include/zproxy_v2.h +62 -0
- data/vendor/local/include/zrex.h +82 -0
- data/vendor/local/include/zsock.h +912 -0
- data/vendor/local/include/zsock_option.inc +4126 -0
- data/vendor/local/include/zsocket.h +110 -0
- data/vendor/local/include/zsockopt.h +256 -0
- data/vendor/local/include/zstr.h +110 -0
- data/vendor/local/include/zsys.h +386 -0
- data/vendor/local/include/zthread.h +50 -0
- data/vendor/local/include/ztimerset.h +90 -0
- data/vendor/local/include/ztrie.h +106 -0
- data/vendor/local/include/zuuid.h +96 -0
- data/vendor/local/lib/libczmq.dll.a +0 -0
- data/vendor/local/lib/liblibzmq.dll.a +0 -0
- data/vendor/local/lib/libzmq-static.a +0 -0
- data/vendor/local/lib/pkgconfig/libczmq.pc +23 -0
- data/vendor/local/lib/pkgconfig/libzmq.pc +11 -0
- data/vendor/local/share/zmq/AUTHORS.txt +147 -0
- data/vendor/local/share/zmq/COPYING.LESSER.txt +181 -0
- data/vendor/local/share/zmq/COPYING.txt +674 -0
- data/vendor/local/share/zmq/NEWS.txt +978 -0
- metadata +230 -0
@@ -0,0 +1,617 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2007-2016 Contributors as noted in the AUTHORS file
|
3
|
+
|
4
|
+
This file is part of libzmq, the ZeroMQ core engine in C++.
|
5
|
+
|
6
|
+
libzmq is free software; you can redistribute it and/or modify it under
|
7
|
+
the terms of the GNU Lesser General Public License (LGPL) as published
|
8
|
+
by the Free Software Foundation; either version 3 of the License, or
|
9
|
+
(at your option) any later version.
|
10
|
+
|
11
|
+
As a special exception, the Contributors give you permission to link
|
12
|
+
this library with independent modules to produce an executable,
|
13
|
+
regardless of the license terms of these independent modules, and to
|
14
|
+
copy and distribute the resulting executable under terms of your choice,
|
15
|
+
provided that you also meet, for each linked independent module, the
|
16
|
+
terms and conditions of the license of that module. An independent
|
17
|
+
module is a module which is not derived from or based on this library.
|
18
|
+
If you modify this library, you must extend this exception to your
|
19
|
+
version of the library.
|
20
|
+
|
21
|
+
libzmq is distributed in the hope that it will be useful, but WITHOUT
|
22
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
24
|
+
License for more details.
|
25
|
+
|
26
|
+
You should have received a copy of the GNU Lesser General Public License
|
27
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
28
|
+
|
29
|
+
*************************************************************************
|
30
|
+
NOTE to contributors. This file comprises the principal public contract
|
31
|
+
for ZeroMQ API users. Any change to this file supplied in a stable
|
32
|
+
release SHOULD not break existing applications.
|
33
|
+
In practice this means that the value of constants must not change, and
|
34
|
+
that old values may not be reused for new constants.
|
35
|
+
*************************************************************************
|
36
|
+
*/
|
37
|
+
|
38
|
+
#ifndef __ZMQ_H_INCLUDED__
|
39
|
+
#define __ZMQ_H_INCLUDED__
|
40
|
+
|
41
|
+
/* Version macros for compile-time API version detection */
|
42
|
+
#define ZMQ_VERSION_MAJOR 4
|
43
|
+
#define ZMQ_VERSION_MINOR 2
|
44
|
+
#define ZMQ_VERSION_PATCH 0
|
45
|
+
|
46
|
+
#define ZMQ_MAKE_VERSION(major, minor, patch) \
|
47
|
+
((major) * 10000 + (minor) * 100 + (patch))
|
48
|
+
#define ZMQ_VERSION \
|
49
|
+
ZMQ_MAKE_VERSION(ZMQ_VERSION_MAJOR, ZMQ_VERSION_MINOR, ZMQ_VERSION_PATCH)
|
50
|
+
|
51
|
+
#ifdef __cplusplus
|
52
|
+
extern "C" {
|
53
|
+
#endif
|
54
|
+
|
55
|
+
#if !defined _WIN32_WCE
|
56
|
+
#include <errno.h>
|
57
|
+
#endif
|
58
|
+
#include <stddef.h>
|
59
|
+
#include <stdio.h>
|
60
|
+
#if defined _WIN32
|
61
|
+
// Set target version to Windows Server 2008, Windows Vista or higher.
|
62
|
+
// Windows XP (0x0501) is supported but without client & server socket types.
|
63
|
+
#ifndef _WIN32_WINNT
|
64
|
+
#define _WIN32_WINNT 0x0600
|
65
|
+
#endif
|
66
|
+
|
67
|
+
#ifdef __MINGW32__
|
68
|
+
// Require Windows XP or higher with MinGW for getaddrinfo().
|
69
|
+
#if(_WIN32_WINNT >= 0x0600)
|
70
|
+
#else
|
71
|
+
#undef _WIN32_WINNT
|
72
|
+
#define _WIN32_WINNT 0x0600
|
73
|
+
#endif
|
74
|
+
#endif
|
75
|
+
#include <winsock2.h>
|
76
|
+
#endif
|
77
|
+
|
78
|
+
/* Handle DSO symbol visibility */
|
79
|
+
#if defined _WIN32
|
80
|
+
# if defined ZMQ_STATIC
|
81
|
+
# define ZMQ_EXPORT
|
82
|
+
# elif defined DLL_EXPORT
|
83
|
+
# define ZMQ_EXPORT __declspec(dllexport)
|
84
|
+
# else
|
85
|
+
# define ZMQ_EXPORT __declspec(dllimport)
|
86
|
+
# endif
|
87
|
+
#else
|
88
|
+
# if defined __SUNPRO_C || defined __SUNPRO_CC
|
89
|
+
# define ZMQ_EXPORT __global
|
90
|
+
# elif (defined __GNUC__ && __GNUC__ >= 4) || defined __INTEL_COMPILER
|
91
|
+
# define ZMQ_EXPORT __attribute__ ((visibility("default")))
|
92
|
+
# else
|
93
|
+
# define ZMQ_EXPORT
|
94
|
+
# endif
|
95
|
+
#endif
|
96
|
+
|
97
|
+
/* Define integer types needed for event interface */
|
98
|
+
#define ZMQ_DEFINED_STDINT 1
|
99
|
+
#if defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_OPENVMS
|
100
|
+
# include <inttypes.h>
|
101
|
+
#elif defined _MSC_VER && _MSC_VER < 1600
|
102
|
+
# ifndef int32_t
|
103
|
+
typedef __int32 int32_t;
|
104
|
+
# endif
|
105
|
+
# ifndef uint16_t
|
106
|
+
typedef unsigned __int16 uint16_t;
|
107
|
+
# endif
|
108
|
+
# ifndef uint8_t
|
109
|
+
typedef unsigned __int8 uint8_t;
|
110
|
+
# endif
|
111
|
+
#else
|
112
|
+
# include <stdint.h>
|
113
|
+
#endif
|
114
|
+
|
115
|
+
|
116
|
+
/******************************************************************************/
|
117
|
+
/* 0MQ errors. */
|
118
|
+
/******************************************************************************/
|
119
|
+
|
120
|
+
/* A number random enough not to collide with different errno ranges on */
|
121
|
+
/* different OSes. The assumption is that error_t is at least 32-bit type. */
|
122
|
+
#define ZMQ_HAUSNUMERO 156384712
|
123
|
+
|
124
|
+
/* On Windows platform some of the standard POSIX errnos are not defined. */
|
125
|
+
#ifndef ENOTSUP
|
126
|
+
#define ENOTSUP (ZMQ_HAUSNUMERO + 1)
|
127
|
+
#endif
|
128
|
+
#ifndef EPROTONOSUPPORT
|
129
|
+
#define EPROTONOSUPPORT (ZMQ_HAUSNUMERO + 2)
|
130
|
+
#endif
|
131
|
+
#ifndef ENOBUFS
|
132
|
+
#define ENOBUFS (ZMQ_HAUSNUMERO + 3)
|
133
|
+
#endif
|
134
|
+
#ifndef ENETDOWN
|
135
|
+
#define ENETDOWN (ZMQ_HAUSNUMERO + 4)
|
136
|
+
#endif
|
137
|
+
#ifndef EADDRINUSE
|
138
|
+
#define EADDRINUSE (ZMQ_HAUSNUMERO + 5)
|
139
|
+
#endif
|
140
|
+
#ifndef EADDRNOTAVAIL
|
141
|
+
#define EADDRNOTAVAIL (ZMQ_HAUSNUMERO + 6)
|
142
|
+
#endif
|
143
|
+
#ifndef ECONNREFUSED
|
144
|
+
#define ECONNREFUSED (ZMQ_HAUSNUMERO + 7)
|
145
|
+
#endif
|
146
|
+
#ifndef EINPROGRESS
|
147
|
+
#define EINPROGRESS (ZMQ_HAUSNUMERO + 8)
|
148
|
+
#endif
|
149
|
+
#ifndef ENOTSOCK
|
150
|
+
#define ENOTSOCK (ZMQ_HAUSNUMERO + 9)
|
151
|
+
#endif
|
152
|
+
#ifndef EMSGSIZE
|
153
|
+
#define EMSGSIZE (ZMQ_HAUSNUMERO + 10)
|
154
|
+
#endif
|
155
|
+
#ifndef EAFNOSUPPORT
|
156
|
+
#define EAFNOSUPPORT (ZMQ_HAUSNUMERO + 11)
|
157
|
+
#endif
|
158
|
+
#ifndef ENETUNREACH
|
159
|
+
#define ENETUNREACH (ZMQ_HAUSNUMERO + 12)
|
160
|
+
#endif
|
161
|
+
#ifndef ECONNABORTED
|
162
|
+
#define ECONNABORTED (ZMQ_HAUSNUMERO + 13)
|
163
|
+
#endif
|
164
|
+
#ifndef ECONNRESET
|
165
|
+
#define ECONNRESET (ZMQ_HAUSNUMERO + 14)
|
166
|
+
#endif
|
167
|
+
#ifndef ENOTCONN
|
168
|
+
#define ENOTCONN (ZMQ_HAUSNUMERO + 15)
|
169
|
+
#endif
|
170
|
+
#ifndef ETIMEDOUT
|
171
|
+
#define ETIMEDOUT (ZMQ_HAUSNUMERO + 16)
|
172
|
+
#endif
|
173
|
+
#ifndef EHOSTUNREACH
|
174
|
+
#define EHOSTUNREACH (ZMQ_HAUSNUMERO + 17)
|
175
|
+
#endif
|
176
|
+
#ifndef ENETRESET
|
177
|
+
#define ENETRESET (ZMQ_HAUSNUMERO + 18)
|
178
|
+
#endif
|
179
|
+
|
180
|
+
/* Native 0MQ error codes. */
|
181
|
+
#define EFSM (ZMQ_HAUSNUMERO + 51)
|
182
|
+
#define ENOCOMPATPROTO (ZMQ_HAUSNUMERO + 52)
|
183
|
+
#define ETERM (ZMQ_HAUSNUMERO + 53)
|
184
|
+
#define EMTHREAD (ZMQ_HAUSNUMERO + 54)
|
185
|
+
|
186
|
+
/* This function retrieves the errno as it is known to 0MQ library. The goal */
|
187
|
+
/* of this function is to make the code 100% portable, including where 0MQ */
|
188
|
+
/* compiled with certain CRT library (on Windows) is linked to an */
|
189
|
+
/* application that uses different CRT library. */
|
190
|
+
ZMQ_EXPORT int zmq_errno (void);
|
191
|
+
|
192
|
+
/* Resolves system errors and 0MQ errors to human-readable string. */
|
193
|
+
ZMQ_EXPORT const char *zmq_strerror (int errnum);
|
194
|
+
|
195
|
+
/* Run-time API version detection */
|
196
|
+
ZMQ_EXPORT void zmq_version (int *major, int *minor, int *patch);
|
197
|
+
|
198
|
+
/******************************************************************************/
|
199
|
+
/* 0MQ infrastructure (a.k.a. context) initialisation & termination. */
|
200
|
+
/******************************************************************************/
|
201
|
+
|
202
|
+
/* Context options */
|
203
|
+
#define ZMQ_IO_THREADS 1
|
204
|
+
#define ZMQ_MAX_SOCKETS 2
|
205
|
+
#define ZMQ_SOCKET_LIMIT 3
|
206
|
+
#define ZMQ_THREAD_PRIORITY 3
|
207
|
+
#define ZMQ_THREAD_SCHED_POLICY 4
|
208
|
+
#define ZMQ_MAX_MSGSZ 5
|
209
|
+
|
210
|
+
/* Default for new contexts */
|
211
|
+
#define ZMQ_IO_THREADS_DFLT 1
|
212
|
+
#define ZMQ_MAX_SOCKETS_DFLT 1023
|
213
|
+
#define ZMQ_THREAD_PRIORITY_DFLT -1
|
214
|
+
#define ZMQ_THREAD_SCHED_POLICY_DFLT -1
|
215
|
+
|
216
|
+
ZMQ_EXPORT void *zmq_ctx_new (void);
|
217
|
+
ZMQ_EXPORT int zmq_ctx_term (void *context);
|
218
|
+
ZMQ_EXPORT int zmq_ctx_shutdown (void *context);
|
219
|
+
ZMQ_EXPORT int zmq_ctx_set (void *context, int option, int optval);
|
220
|
+
ZMQ_EXPORT int zmq_ctx_get (void *context, int option);
|
221
|
+
|
222
|
+
/* Old (legacy) API */
|
223
|
+
ZMQ_EXPORT void *zmq_init (int io_threads);
|
224
|
+
ZMQ_EXPORT int zmq_term (void *context);
|
225
|
+
ZMQ_EXPORT int zmq_ctx_destroy (void *context);
|
226
|
+
|
227
|
+
|
228
|
+
/******************************************************************************/
|
229
|
+
/* 0MQ message definition. */
|
230
|
+
/******************************************************************************/
|
231
|
+
|
232
|
+
/* union here ensures correct alignment on architectures that require it, e.g.
|
233
|
+
* SPARC
|
234
|
+
*/
|
235
|
+
typedef union zmq_msg_t {unsigned char _ [64]; void *p; } zmq_msg_t;
|
236
|
+
|
237
|
+
typedef void (zmq_free_fn) (void *data, void *hint);
|
238
|
+
|
239
|
+
ZMQ_EXPORT int zmq_msg_init (zmq_msg_t *msg);
|
240
|
+
ZMQ_EXPORT int zmq_msg_init_size (zmq_msg_t *msg, size_t size);
|
241
|
+
ZMQ_EXPORT int zmq_msg_init_data (zmq_msg_t *msg, void *data,
|
242
|
+
size_t size, zmq_free_fn *ffn, void *hint);
|
243
|
+
ZMQ_EXPORT int zmq_msg_send (zmq_msg_t *msg, void *s, int flags);
|
244
|
+
ZMQ_EXPORT int zmq_msg_recv (zmq_msg_t *msg, void *s, int flags);
|
245
|
+
ZMQ_EXPORT int zmq_msg_close (zmq_msg_t *msg);
|
246
|
+
ZMQ_EXPORT int zmq_msg_move (zmq_msg_t *dest, zmq_msg_t *src);
|
247
|
+
ZMQ_EXPORT int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src);
|
248
|
+
ZMQ_EXPORT void *zmq_msg_data (zmq_msg_t *msg);
|
249
|
+
ZMQ_EXPORT size_t zmq_msg_size (zmq_msg_t *msg);
|
250
|
+
ZMQ_EXPORT int zmq_msg_more (zmq_msg_t *msg);
|
251
|
+
ZMQ_EXPORT int zmq_msg_get (zmq_msg_t *msg, int property);
|
252
|
+
ZMQ_EXPORT int zmq_msg_set (zmq_msg_t *msg, int property, int optval);
|
253
|
+
ZMQ_EXPORT const char *zmq_msg_gets (zmq_msg_t *msg, const char *property);
|
254
|
+
|
255
|
+
/******************************************************************************/
|
256
|
+
/* 0MQ socket definition. */
|
257
|
+
/******************************************************************************/
|
258
|
+
|
259
|
+
/* Socket types. */
|
260
|
+
#define ZMQ_PAIR 0
|
261
|
+
#define ZMQ_PUB 1
|
262
|
+
#define ZMQ_SUB 2
|
263
|
+
#define ZMQ_REQ 3
|
264
|
+
#define ZMQ_REP 4
|
265
|
+
#define ZMQ_DEALER 5
|
266
|
+
#define ZMQ_ROUTER 6
|
267
|
+
#define ZMQ_PULL 7
|
268
|
+
#define ZMQ_PUSH 8
|
269
|
+
#define ZMQ_XPUB 9
|
270
|
+
#define ZMQ_XSUB 10
|
271
|
+
#define ZMQ_STREAM 11
|
272
|
+
|
273
|
+
/* Deprecated aliases */
|
274
|
+
#define ZMQ_XREQ ZMQ_DEALER
|
275
|
+
#define ZMQ_XREP ZMQ_ROUTER
|
276
|
+
|
277
|
+
/* Socket options. */
|
278
|
+
#define ZMQ_AFFINITY 4
|
279
|
+
#define ZMQ_IDENTITY 5
|
280
|
+
#define ZMQ_SUBSCRIBE 6
|
281
|
+
#define ZMQ_UNSUBSCRIBE 7
|
282
|
+
#define ZMQ_RATE 8
|
283
|
+
#define ZMQ_RECOVERY_IVL 9
|
284
|
+
#define ZMQ_SNDBUF 11
|
285
|
+
#define ZMQ_RCVBUF 12
|
286
|
+
#define ZMQ_RCVMORE 13
|
287
|
+
#define ZMQ_FD 14
|
288
|
+
#define ZMQ_EVENTS 15
|
289
|
+
#define ZMQ_TYPE 16
|
290
|
+
#define ZMQ_LINGER 17
|
291
|
+
#define ZMQ_RECONNECT_IVL 18
|
292
|
+
#define ZMQ_BACKLOG 19
|
293
|
+
#define ZMQ_RECONNECT_IVL_MAX 21
|
294
|
+
#define ZMQ_MAXMSGSIZE 22
|
295
|
+
#define ZMQ_SNDHWM 23
|
296
|
+
#define ZMQ_RCVHWM 24
|
297
|
+
#define ZMQ_MULTICAST_HOPS 25
|
298
|
+
#define ZMQ_RCVTIMEO 27
|
299
|
+
#define ZMQ_SNDTIMEO 28
|
300
|
+
#define ZMQ_LAST_ENDPOINT 32
|
301
|
+
#define ZMQ_ROUTER_MANDATORY 33
|
302
|
+
#define ZMQ_TCP_KEEPALIVE 34
|
303
|
+
#define ZMQ_TCP_KEEPALIVE_CNT 35
|
304
|
+
#define ZMQ_TCP_KEEPALIVE_IDLE 36
|
305
|
+
#define ZMQ_TCP_KEEPALIVE_INTVL 37
|
306
|
+
#define ZMQ_IMMEDIATE 39
|
307
|
+
#define ZMQ_XPUB_VERBOSE 40
|
308
|
+
#define ZMQ_ROUTER_RAW 41
|
309
|
+
#define ZMQ_IPV6 42
|
310
|
+
#define ZMQ_MECHANISM 43
|
311
|
+
#define ZMQ_PLAIN_SERVER 44
|
312
|
+
#define ZMQ_PLAIN_USERNAME 45
|
313
|
+
#define ZMQ_PLAIN_PASSWORD 46
|
314
|
+
#define ZMQ_CURVE_SERVER 47
|
315
|
+
#define ZMQ_CURVE_PUBLICKEY 48
|
316
|
+
#define ZMQ_CURVE_SECRETKEY 49
|
317
|
+
#define ZMQ_CURVE_SERVERKEY 50
|
318
|
+
#define ZMQ_PROBE_ROUTER 51
|
319
|
+
#define ZMQ_REQ_CORRELATE 52
|
320
|
+
#define ZMQ_REQ_RELAXED 53
|
321
|
+
#define ZMQ_CONFLATE 54
|
322
|
+
#define ZMQ_ZAP_DOMAIN 55
|
323
|
+
#define ZMQ_ROUTER_HANDOVER 56
|
324
|
+
#define ZMQ_TOS 57
|
325
|
+
#define ZMQ_CONNECT_RID 61
|
326
|
+
#define ZMQ_GSSAPI_SERVER 62
|
327
|
+
#define ZMQ_GSSAPI_PRINCIPAL 63
|
328
|
+
#define ZMQ_GSSAPI_SERVICE_PRINCIPAL 64
|
329
|
+
#define ZMQ_GSSAPI_PLAINTEXT 65
|
330
|
+
#define ZMQ_HANDSHAKE_IVL 66
|
331
|
+
#define ZMQ_SOCKS_PROXY 68
|
332
|
+
#define ZMQ_XPUB_NODROP 69
|
333
|
+
// All options after this is for version 4.2 and still *draft*
|
334
|
+
// Subject to arbitrary change without notice
|
335
|
+
#define ZMQ_BLOCKY 70
|
336
|
+
#define ZMQ_XPUB_MANUAL 71
|
337
|
+
#define ZMQ_XPUB_WELCOME_MSG 72
|
338
|
+
#define ZMQ_STREAM_NOTIFY 73
|
339
|
+
#define ZMQ_INVERT_MATCHING 74
|
340
|
+
#define ZMQ_HEARTBEAT_IVL 75
|
341
|
+
#define ZMQ_HEARTBEAT_TTL 76
|
342
|
+
#define ZMQ_HEARTBEAT_TIMEOUT 77
|
343
|
+
#define ZMQ_XPUB_VERBOSER 78
|
344
|
+
#define ZMQ_CONNECT_TIMEOUT 79
|
345
|
+
#define ZMQ_TCP_MAXRT 80
|
346
|
+
#define ZMQ_THREAD_SAFE 81
|
347
|
+
#define ZMQ_MULTICAST_MAXTPDU 84
|
348
|
+
#define ZMQ_VMCI_BUFFER_SIZE 85
|
349
|
+
#define ZMQ_VMCI_BUFFER_MIN_SIZE 86
|
350
|
+
#define ZMQ_VMCI_BUFFER_MAX_SIZE 87
|
351
|
+
#define ZMQ_VMCI_CONNECT_TIMEOUT 88
|
352
|
+
#define ZMQ_USE_FD 89
|
353
|
+
|
354
|
+
/* Message options */
|
355
|
+
#define ZMQ_MORE 1
|
356
|
+
#define ZMQ_SHARED 3
|
357
|
+
|
358
|
+
/* Send/recv options. */
|
359
|
+
#define ZMQ_DONTWAIT 1
|
360
|
+
#define ZMQ_SNDMORE 2
|
361
|
+
|
362
|
+
/* Security mechanisms */
|
363
|
+
#define ZMQ_NULL 0
|
364
|
+
#define ZMQ_PLAIN 1
|
365
|
+
#define ZMQ_CURVE 2
|
366
|
+
#define ZMQ_GSSAPI 3
|
367
|
+
|
368
|
+
/* RADIO-DISH protocol */
|
369
|
+
#define ZMQ_GROUP_MAX_LENGTH 15
|
370
|
+
|
371
|
+
/* Deprecated options and aliases */
|
372
|
+
#define ZMQ_TCP_ACCEPT_FILTER 38
|
373
|
+
#define ZMQ_IPC_FILTER_PID 58
|
374
|
+
#define ZMQ_IPC_FILTER_UID 59
|
375
|
+
#define ZMQ_IPC_FILTER_GID 60
|
376
|
+
#define ZMQ_IPV4ONLY 31
|
377
|
+
#define ZMQ_DELAY_ATTACH_ON_CONNECT ZMQ_IMMEDIATE
|
378
|
+
#define ZMQ_NOBLOCK ZMQ_DONTWAIT
|
379
|
+
#define ZMQ_FAIL_UNROUTABLE ZMQ_ROUTER_MANDATORY
|
380
|
+
#define ZMQ_ROUTER_BEHAVIOR ZMQ_ROUTER_MANDATORY
|
381
|
+
|
382
|
+
/* Deprecated Message options */
|
383
|
+
#define ZMQ_SRCFD 2
|
384
|
+
|
385
|
+
/******************************************************************************/
|
386
|
+
/* 0MQ socket events and monitoring */
|
387
|
+
/******************************************************************************/
|
388
|
+
|
389
|
+
/* Socket transport events (TCP, IPC and TIPC only) */
|
390
|
+
|
391
|
+
#define ZMQ_EVENT_CONNECTED 0x0001
|
392
|
+
#define ZMQ_EVENT_CONNECT_DELAYED 0x0002
|
393
|
+
#define ZMQ_EVENT_CONNECT_RETRIED 0x0004
|
394
|
+
#define ZMQ_EVENT_LISTENING 0x0008
|
395
|
+
#define ZMQ_EVENT_BIND_FAILED 0x0010
|
396
|
+
#define ZMQ_EVENT_ACCEPTED 0x0020
|
397
|
+
#define ZMQ_EVENT_ACCEPT_FAILED 0x0040
|
398
|
+
#define ZMQ_EVENT_CLOSED 0x0080
|
399
|
+
#define ZMQ_EVENT_CLOSE_FAILED 0x0100
|
400
|
+
#define ZMQ_EVENT_DISCONNECTED 0x0200
|
401
|
+
#define ZMQ_EVENT_MONITOR_STOPPED 0x0400
|
402
|
+
#define ZMQ_EVENT_ALL 0xFFFF
|
403
|
+
|
404
|
+
ZMQ_EXPORT void *zmq_socket (void *, int type);
|
405
|
+
ZMQ_EXPORT int zmq_close (void *s);
|
406
|
+
ZMQ_EXPORT int zmq_setsockopt (void *s, int option, const void *optval,
|
407
|
+
size_t optvallen);
|
408
|
+
ZMQ_EXPORT int zmq_getsockopt (void *s, int option, void *optval,
|
409
|
+
size_t *optvallen);
|
410
|
+
ZMQ_EXPORT int zmq_bind (void *s, const char *addr);
|
411
|
+
ZMQ_EXPORT int zmq_connect (void *s, const char *addr);
|
412
|
+
ZMQ_EXPORT int zmq_unbind (void *s, const char *addr);
|
413
|
+
ZMQ_EXPORT int zmq_disconnect (void *s, const char *addr);
|
414
|
+
ZMQ_EXPORT int zmq_send (void *s, const void *buf, size_t len, int flags);
|
415
|
+
ZMQ_EXPORT int zmq_send_const (void *s, const void *buf, size_t len, int flags);
|
416
|
+
ZMQ_EXPORT int zmq_recv (void *s, void *buf, size_t len, int flags);
|
417
|
+
ZMQ_EXPORT int zmq_socket_monitor (void *s, const char *addr, int events);
|
418
|
+
|
419
|
+
|
420
|
+
/******************************************************************************/
|
421
|
+
/* I/O multiplexing. */
|
422
|
+
/******************************************************************************/
|
423
|
+
|
424
|
+
#define ZMQ_POLLIN 1
|
425
|
+
#define ZMQ_POLLOUT 2
|
426
|
+
#define ZMQ_POLLERR 4
|
427
|
+
#define ZMQ_POLLPRI 8
|
428
|
+
|
429
|
+
typedef struct zmq_pollitem_t
|
430
|
+
{
|
431
|
+
void *socket;
|
432
|
+
#if defined _WIN32
|
433
|
+
SOCKET fd;
|
434
|
+
#else
|
435
|
+
int fd;
|
436
|
+
#endif
|
437
|
+
short events;
|
438
|
+
short revents;
|
439
|
+
} zmq_pollitem_t;
|
440
|
+
|
441
|
+
#define ZMQ_POLLITEMS_DFLT 16
|
442
|
+
|
443
|
+
ZMQ_EXPORT int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout);
|
444
|
+
|
445
|
+
/******************************************************************************/
|
446
|
+
/* Message proxying */
|
447
|
+
/******************************************************************************/
|
448
|
+
|
449
|
+
ZMQ_EXPORT int zmq_proxy (void *frontend, void *backend, void *capture);
|
450
|
+
ZMQ_EXPORT int zmq_proxy_steerable (void *frontend, void *backend, void *capture, void *control);
|
451
|
+
|
452
|
+
/******************************************************************************/
|
453
|
+
/* Probe library capabilities */
|
454
|
+
/******************************************************************************/
|
455
|
+
|
456
|
+
#define ZMQ_HAS_CAPABILITIES 1
|
457
|
+
ZMQ_EXPORT int zmq_has (const char *capability);
|
458
|
+
|
459
|
+
/* Deprecated aliases */
|
460
|
+
#define ZMQ_STREAMER 1
|
461
|
+
#define ZMQ_FORWARDER 2
|
462
|
+
#define ZMQ_QUEUE 3
|
463
|
+
|
464
|
+
/* Deprecated methods */
|
465
|
+
ZMQ_EXPORT int zmq_device (int type, void *frontend, void *backend);
|
466
|
+
ZMQ_EXPORT int zmq_sendmsg (void *s, zmq_msg_t *msg, int flags);
|
467
|
+
ZMQ_EXPORT int zmq_recvmsg (void *s, zmq_msg_t *msg, int flags);
|
468
|
+
struct iovec;
|
469
|
+
ZMQ_EXPORT int zmq_sendiov (void *s, struct iovec *iov, size_t count, int flags);
|
470
|
+
ZMQ_EXPORT int zmq_recviov (void *s, struct iovec *iov, size_t *count, int flags);
|
471
|
+
|
472
|
+
/******************************************************************************/
|
473
|
+
/* Encryption functions */
|
474
|
+
/******************************************************************************/
|
475
|
+
|
476
|
+
/* Encode data with Z85 encoding. Returns encoded data */
|
477
|
+
ZMQ_EXPORT char *zmq_z85_encode (char *dest, const uint8_t *data, size_t size);
|
478
|
+
|
479
|
+
/* Decode data with Z85 encoding. Returns decoded data */
|
480
|
+
ZMQ_EXPORT uint8_t *zmq_z85_decode (uint8_t *dest, const char *string);
|
481
|
+
|
482
|
+
/* Generate z85-encoded public and private keypair with tweetnacl/libsodium. */
|
483
|
+
/* Returns 0 on success. */
|
484
|
+
ZMQ_EXPORT int zmq_curve_keypair (char *z85_public_key, char *z85_secret_key);
|
485
|
+
|
486
|
+
/* Derive the z85-encoded public key from the z85-encoded secret key. */
|
487
|
+
/* Returns 0 on success. */
|
488
|
+
ZMQ_EXPORT int zmq_curve_public (char *z85_public_key, const char *z85_secret_key);
|
489
|
+
|
490
|
+
/******************************************************************************/
|
491
|
+
/* Atomic utility methods */
|
492
|
+
/******************************************************************************/
|
493
|
+
|
494
|
+
ZMQ_EXPORT void *zmq_atomic_counter_new (void);
|
495
|
+
ZMQ_EXPORT void zmq_atomic_counter_set (void *counter, int value);
|
496
|
+
ZMQ_EXPORT int zmq_atomic_counter_inc (void *counter);
|
497
|
+
ZMQ_EXPORT int zmq_atomic_counter_dec (void *counter);
|
498
|
+
ZMQ_EXPORT int zmq_atomic_counter_value (void *counter);
|
499
|
+
ZMQ_EXPORT void zmq_atomic_counter_destroy (void **counter_p);
|
500
|
+
|
501
|
+
|
502
|
+
/******************************************************************************/
|
503
|
+
/* These functions are not documented by man pages -- use at your own risk. */
|
504
|
+
/* If you need these to be part of the formal ZMQ API, then (a) write a man */
|
505
|
+
/* page, and (b) write a test case in tests. */
|
506
|
+
/******************************************************************************/
|
507
|
+
|
508
|
+
/* Helper functions are used by perf tests so that they don't have to care */
|
509
|
+
/* about minutiae of time-related functions on different OS platforms. */
|
510
|
+
|
511
|
+
/* Starts the stopwatch. Returns the handle to the watch. */
|
512
|
+
ZMQ_EXPORT void *zmq_stopwatch_start (void);
|
513
|
+
|
514
|
+
/* Stops the stopwatch. Returns the number of microseconds elapsed since */
|
515
|
+
/* the stopwatch was started. */
|
516
|
+
ZMQ_EXPORT unsigned long zmq_stopwatch_stop (void *watch_);
|
517
|
+
|
518
|
+
/* Sleeps for specified number of seconds. */
|
519
|
+
ZMQ_EXPORT void zmq_sleep (int seconds_);
|
520
|
+
|
521
|
+
typedef void (zmq_thread_fn) (void*);
|
522
|
+
|
523
|
+
/* Start a thread. Returns a handle to the thread. */
|
524
|
+
ZMQ_EXPORT void *zmq_threadstart (zmq_thread_fn* func, void* arg);
|
525
|
+
|
526
|
+
/* Wait for thread to complete then free up resources. */
|
527
|
+
ZMQ_EXPORT void zmq_threadclose (void* thread);
|
528
|
+
|
529
|
+
|
530
|
+
/******************************************************************************/
|
531
|
+
/* These functions are DRAFT and disabled in stable releases, and subject to */
|
532
|
+
/* change at ANY time until declared stable. */
|
533
|
+
/******************************************************************************/
|
534
|
+
|
535
|
+
#ifdef ZMQ_BUILD_DRAFT_API
|
536
|
+
|
537
|
+
/* DRAFT Socket types. */
|
538
|
+
#define ZMQ_SERVER 12
|
539
|
+
#define ZMQ_CLIENT 13
|
540
|
+
#define ZMQ_RADIO 14
|
541
|
+
#define ZMQ_DISH 15
|
542
|
+
#define ZMQ_GATHER 16
|
543
|
+
#define ZMQ_SCATTER 17
|
544
|
+
#define ZMQ_DGRAM 18
|
545
|
+
|
546
|
+
/* DRAFT Socket methods. */
|
547
|
+
ZMQ_EXPORT int zmq_join (void *s, const char *group);
|
548
|
+
ZMQ_EXPORT int zmq_leave (void *s, const char *group);
|
549
|
+
|
550
|
+
/* DRAFT Msg methods. */
|
551
|
+
ZMQ_EXPORT int zmq_msg_set_routing_id(zmq_msg_t *msg, uint32_t routing_id);
|
552
|
+
ZMQ_EXPORT uint32_t zmq_msg_routing_id(zmq_msg_t *msg);
|
553
|
+
ZMQ_EXPORT int zmq_msg_set_group(zmq_msg_t *msg, const char *group);
|
554
|
+
ZMQ_EXPORT const char *zmq_msg_group(zmq_msg_t *msg);
|
555
|
+
|
556
|
+
/******************************************************************************/
|
557
|
+
/* Poller polling on sockets,fd and thread-safe sockets */
|
558
|
+
/******************************************************************************/
|
559
|
+
|
560
|
+
#define ZMQ_HAVE_POLLER
|
561
|
+
|
562
|
+
typedef struct zmq_poller_event_t
|
563
|
+
{
|
564
|
+
void *socket;
|
565
|
+
#if defined _WIN32
|
566
|
+
SOCKET fd;
|
567
|
+
#else
|
568
|
+
int fd;
|
569
|
+
#endif
|
570
|
+
void *user_data;
|
571
|
+
short events;
|
572
|
+
} zmq_poller_event_t;
|
573
|
+
|
574
|
+
ZMQ_EXPORT void *zmq_poller_new (void);
|
575
|
+
ZMQ_EXPORT int zmq_poller_destroy (void **poller_p);
|
576
|
+
ZMQ_EXPORT int zmq_poller_add (void *poller, void *socket, void *user_data, short events);
|
577
|
+
ZMQ_EXPORT int zmq_poller_modify (void *poller, void *socket, short events);
|
578
|
+
ZMQ_EXPORT int zmq_poller_remove (void *poller, void *socket);
|
579
|
+
ZMQ_EXPORT int zmq_poller_wait (void *poller, zmq_poller_event_t *event, long timeout);
|
580
|
+
|
581
|
+
#if defined _WIN32
|
582
|
+
ZMQ_EXPORT int zmq_poller_add_fd (void *poller, SOCKET fd, void *user_data, short events);
|
583
|
+
ZMQ_EXPORT int zmq_poller_modify_fd (void *poller, SOCKET fd, short events);
|
584
|
+
ZMQ_EXPORT int zmq_poller_remove_fd (void *poller, SOCKET fd);
|
585
|
+
#else
|
586
|
+
ZMQ_EXPORT int zmq_poller_add_fd (void *poller, int fd, void *user_data, short events);
|
587
|
+
ZMQ_EXPORT int zmq_poller_modify_fd (void *poller, int fd, short events);
|
588
|
+
ZMQ_EXPORT int zmq_poller_remove_fd (void *poller, int fd);
|
589
|
+
#endif
|
590
|
+
|
591
|
+
/******************************************************************************/
|
592
|
+
/* Scheduling timers */
|
593
|
+
/******************************************************************************/
|
594
|
+
|
595
|
+
#define ZMQ_HAVE_TIMERS
|
596
|
+
|
597
|
+
typedef void (zmq_timer_fn)(int timer_id, void *arg);
|
598
|
+
|
599
|
+
ZMQ_EXPORT void *zmq_timers_new (void);
|
600
|
+
ZMQ_EXPORT int zmq_timers_destroy (void **timers_p);
|
601
|
+
ZMQ_EXPORT int zmq_timers_add (void *timers, size_t interval, zmq_timer_fn handler, void *arg);
|
602
|
+
ZMQ_EXPORT int zmq_timers_cancel (void *timers, int timer_id);
|
603
|
+
ZMQ_EXPORT int zmq_timers_set_interval (void *timers, int timer_id, size_t interval);
|
604
|
+
ZMQ_EXPORT int zmq_timers_reset (void *timers, int timer_id);
|
605
|
+
ZMQ_EXPORT long zmq_timers_timeout (void *timers);
|
606
|
+
ZMQ_EXPORT int zmq_timers_execute (void *timers);
|
607
|
+
|
608
|
+
#endif // ZMQ_BUILD_DRAFT_API
|
609
|
+
|
610
|
+
|
611
|
+
#undef ZMQ_EXPORT
|
612
|
+
|
613
|
+
#ifdef __cplusplus
|
614
|
+
}
|
615
|
+
#endif
|
616
|
+
|
617
|
+
#endif
|