czmq-ffi-gen 0.13.0-x86-mingw32 → 0.14.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +13 -0
- data/lib/czmq-ffi-gen/czmq/ffi.rb +224 -698
- data/lib/czmq-ffi-gen/czmq/ffi/zactor.rb +40 -7
- data/lib/czmq-ffi-gen/czmq/ffi/zargs.rb +259 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zarmour.rb +3 -3
- data/lib/czmq-ffi-gen/czmq/ffi/zcert.rb +15 -6
- data/lib/czmq-ffi-gen/czmq/ffi/zcertstore.rb +25 -11
- data/lib/czmq-ffi-gen/czmq/ffi/zchunk.rb +18 -18
- data/lib/czmq-ffi-gen/czmq/ffi/zclock.rb +6 -6
- data/lib/czmq-ffi-gen/czmq/ffi/zconfig.rb +27 -17
- data/lib/czmq-ffi-gen/czmq/ffi/zdigest.rb +4 -4
- data/lib/czmq-ffi-gen/czmq/ffi/zdir.rb +36 -36
- data/lib/czmq-ffi-gen/czmq/ffi/zdir_patch.rb +1 -1
- data/lib/czmq-ffi-gen/czmq/ffi/zfile.rb +27 -19
- data/lib/czmq-ffi-gen/czmq/ffi/zframe.rb +22 -21
- data/lib/czmq-ffi-gen/czmq/ffi/zhash.rb +54 -54
- data/lib/czmq-ffi-gen/czmq/ffi/zhashx.rb +82 -80
- data/lib/czmq-ffi-gen/czmq/ffi/ziflist.rb +30 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zlist.rb +30 -30
- data/lib/czmq-ffi-gen/czmq/ffi/zlistx.rb +44 -44
- data/lib/czmq-ffi-gen/czmq/ffi/zloop.rb +39 -39
- data/lib/czmq-ffi-gen/czmq/ffi/zmsg.rb +46 -46
- data/lib/czmq-ffi-gen/czmq/ffi/zpoller.rb +16 -16
- data/lib/czmq-ffi-gen/czmq/ffi/zproc.rb +237 -34
- data/lib/czmq-ffi-gen/czmq/ffi/zsock.rb +1201 -973
- data/lib/czmq-ffi-gen/czmq/ffi/zstr.rb +58 -19
- data/lib/czmq-ffi-gen/czmq/ffi/zsys.rb +836 -0
- data/lib/czmq-ffi-gen/czmq/ffi/ztimerset.rb +6 -6
- data/lib/czmq-ffi-gen/czmq/ffi/ztrie.rb +10 -10
- data/lib/czmq-ffi-gen/czmq/ffi/zuuid.rb +4 -4
- data/lib/czmq-ffi-gen/gem_version.rb +1 -1
- data/lib/czmq-ffi-gen/vendor.rb +9 -1
- 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/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/bin/zmakecert.exe +0 -0
- data/vendor/local/include/czmq_library.h +18 -9
- data/vendor/local/include/czmq_prelude.h +104 -16
- data/vendor/local/include/zactor.h +25 -7
- data/vendor/local/include/zarmour.h +3 -3
- data/vendor/local/include/zcert.h +11 -6
- data/vendor/local/include/zcertstore.h +18 -9
- data/vendor/local/include/zchunk.h +18 -18
- data/vendor/local/include/zclock.h +6 -6
- data/vendor/local/include/zconfig.h +25 -16
- data/vendor/local/include/zdigest.h +4 -4
- data/vendor/local/include/zdir.h +36 -36
- data/vendor/local/include/zdir_patch.h +1 -1
- data/vendor/local/include/zfile.h +27 -19
- data/vendor/local/include/zframe.h +22 -21
- data/vendor/local/include/zgossip.h +5 -5
- data/vendor/local/include/zgossip_engine.inc +103 -22
- data/vendor/local/include/zgossip_msg.h +28 -30
- data/vendor/local/include/zhash.h +53 -53
- data/vendor/local/include/zhashx.h +75 -73
- data/vendor/local/include/ziflist.h +22 -1
- data/vendor/local/include/zlist.h +28 -28
- data/vendor/local/include/zlistx.h +41 -41
- data/vendor/local/include/zloop.h +36 -36
- data/vendor/local/include/zmsg.h +46 -46
- data/vendor/local/include/zpoller.h +16 -16
- data/vendor/local/include/zsock.h +414 -364
- data/vendor/local/include/zsock_option.inc +234 -1062
- data/vendor/local/include/zstr.h +44 -19
- data/vendor/local/include/zsys.h +63 -19
- data/vendor/local/include/zuuid.h +4 -4
- data/vendor/local/lib/libczmq.dll.a +0 -0
- data/vendor/local/lib/liblibzmq.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/libczmq.pc +1 -1
- metadata +6 -3
@@ -1,6 +1,6 @@
|
|
1
1
|
/* =========================================================================
|
2
2
|
ziflist - List of network interfaces available on system
|
3
|
-
|
3
|
+
|
4
4
|
Copyright (c) the Contributors as noted in the AUTHORS file.
|
5
5
|
This file is part of CZMQ, the high-level C binding for 0MQ:
|
6
6
|
http://czmq.zeromq.org.
|
@@ -23,6 +23,8 @@ extern "C" {
|
|
23
23
|
// @interface
|
24
24
|
// This is a stable class, and may not change except for emergencies. It
|
25
25
|
// is provided in stable builds.
|
26
|
+
// This class has draft methods, which may change over time. They are not
|
27
|
+
// in stable releases, by default. Use --enable-drafts to enable.
|
26
28
|
// Get a list of network interfaces currently defined on the system
|
27
29
|
CZMQ_EXPORT ziflist_t *
|
28
30
|
ziflist_new (void);
|
@@ -67,6 +69,25 @@ CZMQ_EXPORT void
|
|
67
69
|
CZMQ_EXPORT void
|
68
70
|
ziflist_test (bool verbose);
|
69
71
|
|
72
|
+
#ifdef CZMQ_BUILD_DRAFT_API
|
73
|
+
// *** Draft method, for development use, may change without warning ***
|
74
|
+
// Get a list of network interfaces currently defined on the system
|
75
|
+
// Includes IPv6 interfaces
|
76
|
+
// Caller owns return value and must destroy it when done.
|
77
|
+
CZMQ_EXPORT ziflist_t *
|
78
|
+
ziflist_new_ipv6 (void);
|
79
|
+
|
80
|
+
// *** Draft method, for development use, may change without warning ***
|
81
|
+
// Reload network interfaces from system, including IPv6
|
82
|
+
CZMQ_EXPORT void
|
83
|
+
ziflist_reload_ipv6 (ziflist_t *self);
|
84
|
+
|
85
|
+
// *** Draft method, for development use, may change without warning ***
|
86
|
+
// Return true if the current interface uses IPv6
|
87
|
+
CZMQ_EXPORT bool
|
88
|
+
ziflist_is_ipv6 (ziflist_t *self);
|
89
|
+
|
90
|
+
#endif // CZMQ_BUILD_DRAFT_API
|
70
91
|
// @end
|
71
92
|
|
72
93
|
|
@@ -40,17 +40,17 @@ CZMQ_EXPORT void
|
|
40
40
|
zlist_destroy (zlist_t **self_p);
|
41
41
|
|
42
42
|
// Return the item at the head of list. If the list is empty, returns NULL.
|
43
|
-
// Leaves cursor pointing at the head item, or NULL if the list is empty.
|
43
|
+
// Leaves cursor pointing at the head item, or NULL if the list is empty.
|
44
44
|
CZMQ_EXPORT void *
|
45
45
|
zlist_first (zlist_t *self);
|
46
46
|
|
47
47
|
// Return the next item. If the list is empty, returns NULL. To move to
|
48
|
-
// the start of the list call zlist_first (). Advances the cursor.
|
48
|
+
// the start of the list call zlist_first (). Advances the cursor.
|
49
49
|
CZMQ_EXPORT void *
|
50
50
|
zlist_next (zlist_t *self);
|
51
51
|
|
52
52
|
// Return the item at the tail of list. If the list is empty, returns NULL.
|
53
|
-
// Leaves cursor pointing at the tail item, or NULL if the list is empty.
|
53
|
+
// Leaves cursor pointing at the tail item, or NULL if the list is empty.
|
54
54
|
CZMQ_EXPORT void *
|
55
55
|
zlist_last (zlist_t *self);
|
56
56
|
|
@@ -62,20 +62,20 @@ CZMQ_EXPORT void *
|
|
62
62
|
CZMQ_EXPORT void *
|
63
63
|
zlist_tail (zlist_t *self);
|
64
64
|
|
65
|
-
// Return the current item of list. If the list is empty, returns NULL.
|
65
|
+
// Return the current item of list. If the list is empty, returns NULL.
|
66
66
|
// Leaves cursor pointing at the current item, or NULL if the list is empty.
|
67
67
|
CZMQ_EXPORT void *
|
68
68
|
zlist_item (zlist_t *self);
|
69
69
|
|
70
|
-
// Append an item to the end of the list, return 0 if OK or -1 if this
|
70
|
+
// Append an item to the end of the list, return 0 if OK or -1 if this
|
71
71
|
// failed for some reason (out of memory). Note that if a duplicator has
|
72
|
-
// been set, this method will also duplicate the item.
|
72
|
+
// been set, this method will also duplicate the item.
|
73
73
|
CZMQ_EXPORT int
|
74
74
|
zlist_append (zlist_t *self, void *item);
|
75
75
|
|
76
|
-
// Push an item to the start of the list, return 0 if OK or -1 if this
|
76
|
+
// Push an item to the start of the list, return 0 if OK or -1 if this
|
77
77
|
// failed for some reason (out of memory). Note that if a duplicator has
|
78
|
-
// been set, this method will also duplicate the item.
|
78
|
+
// been set, this method will also duplicate the item.
|
79
79
|
CZMQ_EXPORT int
|
80
80
|
zlist_push (zlist_t *self, void *item);
|
81
81
|
|
@@ -83,9 +83,9 @@ CZMQ_EXPORT int
|
|
83
83
|
CZMQ_EXPORT void *
|
84
84
|
zlist_pop (zlist_t *self);
|
85
85
|
|
86
|
-
// Checks if an item already is present. Uses compare method to determine if
|
86
|
+
// Checks if an item already is present. Uses compare method to determine if
|
87
87
|
// items are equal. If the compare method is NULL the check will only compare
|
88
|
-
// pointers. Returns true if item is present else false.
|
88
|
+
// pointers. Returns true if item is present else false.
|
89
89
|
CZMQ_EXPORT bool
|
90
90
|
zlist_exists (zlist_t *self, void *item);
|
91
91
|
|
@@ -93,10 +93,10 @@ CZMQ_EXPORT bool
|
|
93
93
|
CZMQ_EXPORT void
|
94
94
|
zlist_remove (zlist_t *self, void *item);
|
95
95
|
|
96
|
-
// Make a copy of list. If the list has autofree set, the copied list will
|
96
|
+
// Make a copy of list. If the list has autofree set, the copied list will
|
97
97
|
// duplicate all items, which must be strings. Otherwise, the list will hold
|
98
98
|
// pointers back to the items in the original list. If list is null, returns
|
99
|
-
// NULL.
|
99
|
+
// NULL.
|
100
100
|
// Caller owns return value and must destroy it when done.
|
101
101
|
CZMQ_EXPORT zlist_t *
|
102
102
|
zlist_dup (zlist_t *self);
|
@@ -109,38 +109,38 @@ CZMQ_EXPORT void
|
|
109
109
|
CZMQ_EXPORT size_t
|
110
110
|
zlist_size (zlist_t *self);
|
111
111
|
|
112
|
-
// Sort the list. If the compare function is null, sorts the list by
|
113
|
-
// ascending key value using a straight ASCII comparison. If you specify
|
112
|
+
// Sort the list. If the compare function is null, sorts the list by
|
113
|
+
// ascending key value using a straight ASCII comparison. If you specify
|
114
114
|
// a compare function, this decides how items are sorted. The sort is not
|
115
115
|
// stable, so may reorder items with the same keys. The algorithm used is
|
116
|
-
// combsort, a compromise between performance and simplicity.
|
116
|
+
// combsort, a compromise between performance and simplicity.
|
117
117
|
CZMQ_EXPORT void
|
118
118
|
zlist_sort (zlist_t *self, zlist_compare_fn compare);
|
119
119
|
|
120
|
-
// Set list for automatic item destruction; item values MUST be strings.
|
121
|
-
// By default a list item refers to a value held elsewhere. When you set
|
120
|
+
// Set list for automatic item destruction; item values MUST be strings.
|
121
|
+
// By default a list item refers to a value held elsewhere. When you set
|
122
122
|
// this, each time you append or push a list item, zlist will take a copy
|
123
123
|
// of the string value. Then, when you destroy the list, it will free all
|
124
|
-
// item values automatically. If you use any other technique to allocate
|
124
|
+
// item values automatically. If you use any other technique to allocate
|
125
125
|
// list values, you must free them explicitly before destroying the list.
|
126
|
-
// The usual technique is to pop list items and destroy them, until the
|
127
|
-
// list is empty.
|
126
|
+
// The usual technique is to pop list items and destroy them, until the
|
127
|
+
// list is empty.
|
128
128
|
CZMQ_EXPORT void
|
129
129
|
zlist_autofree (zlist_t *self);
|
130
130
|
|
131
131
|
// Sets a compare function for this list. The function compares two items.
|
132
|
-
// It returns an integer less than, equal to, or greater than zero if the
|
133
|
-
// first item is found, respectively, to be less than, to match, or be
|
134
|
-
// greater than the second item.
|
135
|
-
// This function is used for sorting, removal and exists checking.
|
132
|
+
// It returns an integer less than, equal to, or greater than zero if the
|
133
|
+
// first item is found, respectively, to be less than, to match, or be
|
134
|
+
// greater than the second item.
|
135
|
+
// This function is used for sorting, removal and exists checking.
|
136
136
|
CZMQ_EXPORT void
|
137
137
|
zlist_comparefn (zlist_t *self, zlist_compare_fn fn);
|
138
138
|
|
139
|
-
// Set a free function for the specified list item. When the item is
|
140
|
-
// destroyed, the free function, if any, is called on that item.
|
141
|
-
// Use this when list items are dynamically allocated, to ensure that
|
139
|
+
// Set a free function for the specified list item. When the item is
|
140
|
+
// destroyed, the free function, if any, is called on that item.
|
141
|
+
// Use this when list items are dynamically allocated, to ensure that
|
142
142
|
// you don't have memory leaks. You can pass 'free' or NULL as a free_fn.
|
143
|
-
// Returns the item, or NULL if there is no such item.
|
143
|
+
// Returns the item, or NULL if there is no such item.
|
144
144
|
CZMQ_EXPORT void *
|
145
145
|
zlist_freefn (zlist_t *self, void *item, zlist_free_fn fn, bool at_tail);
|
146
146
|
|
@@ -40,19 +40,19 @@ CZMQ_EXPORT zlistx_t *
|
|
40
40
|
zlistx_new (void);
|
41
41
|
|
42
42
|
// Destroy a list. If an item destructor was specified, all items in the
|
43
|
-
// list are automatically destroyed as well.
|
43
|
+
// list are automatically destroyed as well.
|
44
44
|
CZMQ_EXPORT void
|
45
45
|
zlistx_destroy (zlistx_t **self_p);
|
46
46
|
|
47
47
|
// Add an item to the head of the list. Calls the item duplicator, if any,
|
48
|
-
// on the item. Resets cursor to list head. Returns an item handle on
|
49
|
-
// success, NULL if memory was exhausted.
|
48
|
+
// on the item. Resets cursor to list head. Returns an item handle on
|
49
|
+
// success, NULL if memory was exhausted.
|
50
50
|
CZMQ_EXPORT void *
|
51
51
|
zlistx_add_start (zlistx_t *self, void *item);
|
52
52
|
|
53
53
|
// Add an item to the tail of the list. Calls the item duplicator, if any,
|
54
|
-
// on the item. Resets cursor to list head. Returns an item handle on
|
55
|
-
// success, NULL if memory was exhausted.
|
54
|
+
// on the item. Resets cursor to list head. Returns an item handle on
|
55
|
+
// success, NULL if memory was exhausted.
|
56
56
|
CZMQ_EXPORT void *
|
57
57
|
zlistx_add_end (zlistx_t *self, void *item);
|
58
58
|
|
@@ -69,68 +69,68 @@ CZMQ_EXPORT void *
|
|
69
69
|
zlistx_tail (zlistx_t *self);
|
70
70
|
|
71
71
|
// Return the item at the head of list. If the list is empty, returns NULL.
|
72
|
-
// Leaves cursor pointing at the head item, or NULL if the list is empty.
|
72
|
+
// Leaves cursor pointing at the head item, or NULL if the list is empty.
|
73
73
|
CZMQ_EXPORT void *
|
74
74
|
zlistx_first (zlistx_t *self);
|
75
75
|
|
76
|
-
// Return the next item. At the end of the list (or in an empty list),
|
76
|
+
// Return the next item. At the end of the list (or in an empty list),
|
77
77
|
// returns NULL. Use repeated zlistx_next () calls to work through the list
|
78
|
-
// from zlistx_first (). First time, acts as zlistx_first().
|
78
|
+
// from zlistx_first (). First time, acts as zlistx_first().
|
79
79
|
CZMQ_EXPORT void *
|
80
80
|
zlistx_next (zlistx_t *self);
|
81
81
|
|
82
82
|
// Return the previous item. At the start of the list (or in an empty list),
|
83
|
-
// returns NULL. Use repeated zlistx_prev () calls to work through the list
|
84
|
-
// backwards from zlistx_last (). First time, acts as zlistx_last().
|
83
|
+
// returns NULL. Use repeated zlistx_prev () calls to work through the list
|
84
|
+
// backwards from zlistx_last (). First time, acts as zlistx_last().
|
85
85
|
CZMQ_EXPORT void *
|
86
86
|
zlistx_prev (zlistx_t *self);
|
87
87
|
|
88
88
|
// Return the item at the tail of list. If the list is empty, returns NULL.
|
89
|
-
// Leaves cursor pointing at the tail item, or NULL if the list is empty.
|
89
|
+
// Leaves cursor pointing at the tail item, or NULL if the list is empty.
|
90
90
|
CZMQ_EXPORT void *
|
91
91
|
zlistx_last (zlistx_t *self);
|
92
92
|
|
93
93
|
// Returns the value of the item at the cursor, or NULL if the cursor is
|
94
|
-
// not pointing to an item.
|
94
|
+
// not pointing to an item.
|
95
95
|
CZMQ_EXPORT void *
|
96
96
|
zlistx_item (zlistx_t *self);
|
97
97
|
|
98
98
|
// Returns the handle of the item at the cursor, or NULL if the cursor is
|
99
|
-
// not pointing to an item.
|
99
|
+
// not pointing to an item.
|
100
100
|
CZMQ_EXPORT void *
|
101
101
|
zlistx_cursor (zlistx_t *self);
|
102
102
|
|
103
|
-
// Returns the item associated with the given list handle, or NULL if passed
|
103
|
+
// Returns the item associated with the given list handle, or NULL if passed
|
104
104
|
// in handle is NULL. Asserts that the passed in handle points to a list element.
|
105
105
|
CZMQ_EXPORT void *
|
106
106
|
zlistx_handle_item (void *handle);
|
107
107
|
|
108
|
-
// Find an item in the list, searching from the start. Uses the item
|
109
|
-
// comparator, if any, else compares item values directly. Returns the
|
108
|
+
// Find an item in the list, searching from the start. Uses the item
|
109
|
+
// comparator, if any, else compares item values directly. Returns the
|
110
110
|
// item handle found, or NULL. Sets the cursor to the found item, if any.
|
111
111
|
CZMQ_EXPORT void *
|
112
112
|
zlistx_find (zlistx_t *self, void *item);
|
113
113
|
|
114
|
-
// Detach an item from the list, using its handle. The item is not modified,
|
114
|
+
// Detach an item from the list, using its handle. The item is not modified,
|
115
115
|
// and the caller is responsible for destroying it if necessary. If handle is
|
116
116
|
// null, detaches the first item on the list. Returns item that was detached,
|
117
117
|
// or null if none was. If cursor was at item, moves cursor to previous item,
|
118
|
-
// so you can detach items while iterating forwards through a list.
|
118
|
+
// so you can detach items while iterating forwards through a list.
|
119
119
|
CZMQ_EXPORT void *
|
120
120
|
zlistx_detach (zlistx_t *self, void *handle);
|
121
121
|
|
122
122
|
// Detach item at the cursor, if any, from the list. The item is not modified,
|
123
|
-
// and the caller is responsible for destroying it as necessary. Returns item
|
124
|
-
// that was detached, or null if none was. Moves cursor to previous item, so
|
125
|
-
// you can detach items while iterating forwards through a list.
|
123
|
+
// and the caller is responsible for destroying it as necessary. Returns item
|
124
|
+
// that was detached, or null if none was. Moves cursor to previous item, so
|
125
|
+
// you can detach items while iterating forwards through a list.
|
126
126
|
CZMQ_EXPORT void *
|
127
127
|
zlistx_detach_cur (zlistx_t *self);
|
128
128
|
|
129
|
-
// Delete an item, using its handle. Calls the item destructor is any is
|
130
|
-
// set. If handle is null, deletes the first item on the list. Returns 0
|
129
|
+
// Delete an item, using its handle. Calls the item destructor is any is
|
130
|
+
// set. If handle is null, deletes the first item on the list. Returns 0
|
131
131
|
// if an item was deleted, -1 if not. If cursor was at item, moves cursor
|
132
|
-
// to previous item, so you can delete items while iterating forwards
|
133
|
-
// through a list.
|
132
|
+
// to previous item, so you can delete items while iterating forwards
|
133
|
+
// through a list.
|
134
134
|
CZMQ_EXPORT int
|
135
135
|
zlistx_delete (zlistx_t *self, void *handle);
|
136
136
|
|
@@ -143,51 +143,51 @@ CZMQ_EXPORT void
|
|
143
143
|
zlistx_move_end (zlistx_t *self, void *handle);
|
144
144
|
|
145
145
|
// Remove all items from the list, and destroy them if the item destructor
|
146
|
-
// is set.
|
146
|
+
// is set.
|
147
147
|
CZMQ_EXPORT void
|
148
148
|
zlistx_purge (zlistx_t *self);
|
149
149
|
|
150
|
-
// Sort the list. If an item comparator was set, calls that to compare
|
150
|
+
// Sort the list. If an item comparator was set, calls that to compare
|
151
151
|
// items, otherwise compares on item value. The sort is not stable, so may
|
152
|
-
// reorder equal items.
|
152
|
+
// reorder equal items.
|
153
153
|
CZMQ_EXPORT void
|
154
154
|
zlistx_sort (zlistx_t *self);
|
155
155
|
|
156
|
-
// Create a new node and insert it into a sorted list. Calls the item
|
157
|
-
// duplicator, if any, on the item. If low_value is true, starts searching
|
158
|
-
// from the start of the list, otherwise searches from the end. Use the item
|
159
|
-
// comparator, if any, to find where to place the new node. Returns a handle
|
156
|
+
// Create a new node and insert it into a sorted list. Calls the item
|
157
|
+
// duplicator, if any, on the item. If low_value is true, starts searching
|
158
|
+
// from the start of the list, otherwise searches from the end. Use the item
|
159
|
+
// comparator, if any, to find where to place the new node. Returns a handle
|
160
160
|
// to the new node, or NULL if memory was exhausted. Resets the cursor to the
|
161
|
-
// list head.
|
161
|
+
// list head.
|
162
162
|
CZMQ_EXPORT void *
|
163
163
|
zlistx_insert (zlistx_t *self, void *item, bool low_value);
|
164
164
|
|
165
|
-
// Move an item, specified by handle, into position in a sorted list. Uses
|
165
|
+
// Move an item, specified by handle, into position in a sorted list. Uses
|
166
166
|
// the item comparator, if any, to determine the new location. If low_value
|
167
167
|
// is true, starts searching from the start of the list, otherwise searches
|
168
|
-
// from the end.
|
168
|
+
// from the end.
|
169
169
|
CZMQ_EXPORT void
|
170
170
|
zlistx_reorder (zlistx_t *self, void *handle, bool low_value);
|
171
171
|
|
172
172
|
// Make a copy of the list; items are duplicated if you set a duplicator
|
173
|
-
// for the list, otherwise not. Copying a null reference returns a null
|
174
|
-
// reference.
|
173
|
+
// for the list, otherwise not. Copying a null reference returns a null
|
174
|
+
// reference.
|
175
175
|
CZMQ_EXPORT zlistx_t *
|
176
176
|
zlistx_dup (zlistx_t *self);
|
177
177
|
|
178
178
|
// Set a user-defined deallocator for list items; by default items are not
|
179
|
-
// freed when the list is destroyed.
|
179
|
+
// freed when the list is destroyed.
|
180
180
|
CZMQ_EXPORT void
|
181
181
|
zlistx_set_destructor (zlistx_t *self, zlistx_destructor_fn destructor);
|
182
182
|
|
183
183
|
// Set a user-defined duplicator for list items; by default items are not
|
184
|
-
// copied when the list is duplicated.
|
184
|
+
// copied when the list is duplicated.
|
185
185
|
CZMQ_EXPORT void
|
186
186
|
zlistx_set_duplicator (zlistx_t *self, zlistx_duplicator_fn duplicator);
|
187
187
|
|
188
|
-
// Set a user-defined comparator for zlistx_find and zlistx_sort; the method
|
188
|
+
// Set a user-defined comparator for zlistx_find and zlistx_sort; the method
|
189
189
|
// must return -1, 0, or 1 depending on whether item1 is less than, equal to,
|
190
|
-
// or greater than, item2.
|
190
|
+
// or greater than, item2.
|
191
191
|
CZMQ_EXPORT void
|
192
192
|
zlistx_set_comparator (zlistx_t *self, zlistx_comparator_fn comparator);
|
193
193
|
|
@@ -43,106 +43,106 @@ CZMQ_EXPORT zloop_t *
|
|
43
43
|
CZMQ_EXPORT void
|
44
44
|
zloop_destroy (zloop_t **self_p);
|
45
45
|
|
46
|
-
// Register socket reader with the reactor. When the reader has messages,
|
46
|
+
// Register socket reader with the reactor. When the reader has messages,
|
47
47
|
// the reactor will call the handler, passing the arg. Returns 0 if OK, -1
|
48
|
-
// if there was an error. If you register the same socket more than once,
|
49
|
-
// each instance will invoke its corresponding handler.
|
48
|
+
// if there was an error. If you register the same socket more than once,
|
49
|
+
// each instance will invoke its corresponding handler.
|
50
50
|
CZMQ_EXPORT int
|
51
51
|
zloop_reader (zloop_t *self, zsock_t *sock, zloop_reader_fn handler, void *arg);
|
52
52
|
|
53
53
|
// Cancel a socket reader from the reactor. If multiple readers exist for
|
54
|
-
// same socket, cancels ALL of them.
|
54
|
+
// same socket, cancels ALL of them.
|
55
55
|
CZMQ_EXPORT void
|
56
56
|
zloop_reader_end (zloop_t *self, zsock_t *sock);
|
57
57
|
|
58
58
|
// Configure a registered reader to ignore errors. If you do not set this,
|
59
|
-
// then readers that have errors are removed from the reactor silently.
|
59
|
+
// then readers that have errors are removed from the reactor silently.
|
60
60
|
CZMQ_EXPORT void
|
61
61
|
zloop_reader_set_tolerant (zloop_t *self, zsock_t *sock);
|
62
62
|
|
63
|
-
// Register low-level libzmq pollitem with the reactor. When the pollitem
|
64
|
-
// is ready, will call the handler, passing the arg. Returns 0 if OK, -1
|
63
|
+
// Register low-level libzmq pollitem with the reactor. When the pollitem
|
64
|
+
// is ready, will call the handler, passing the arg. Returns 0 if OK, -1
|
65
65
|
// if there was an error. If you register the pollitem more than once, each
|
66
|
-
// instance will invoke its corresponding handler. A pollitem with
|
67
|
-
// socket=NULL and fd=0 means 'poll on FD zero'.
|
66
|
+
// instance will invoke its corresponding handler. A pollitem with
|
67
|
+
// socket=NULL and fd=0 means 'poll on FD zero'.
|
68
68
|
CZMQ_EXPORT int
|
69
69
|
zloop_poller (zloop_t *self, zmq_pollitem_t *item, zloop_fn handler, void *arg);
|
70
70
|
|
71
71
|
// Cancel a pollitem from the reactor, specified by socket or FD. If both
|
72
72
|
// are specified, uses only socket. If multiple poll items exist for same
|
73
|
-
// socket/FD, cancels ALL of them.
|
73
|
+
// socket/FD, cancels ALL of them.
|
74
74
|
CZMQ_EXPORT void
|
75
75
|
zloop_poller_end (zloop_t *self, zmq_pollitem_t *item);
|
76
76
|
|
77
77
|
// Configure a registered poller to ignore errors. If you do not set this,
|
78
|
-
// then poller that have errors are removed from the reactor silently.
|
78
|
+
// then poller that have errors are removed from the reactor silently.
|
79
79
|
CZMQ_EXPORT void
|
80
80
|
zloop_poller_set_tolerant (zloop_t *self, zmq_pollitem_t *item);
|
81
81
|
|
82
82
|
// Register a timer that expires after some delay and repeats some number of
|
83
|
-
// times. At each expiry, will call the handler, passing the arg. To run a
|
83
|
+
// times. At each expiry, will call the handler, passing the arg. To run a
|
84
84
|
// timer forever, use 0 times. Returns a timer_id that is used to cancel the
|
85
|
-
// timer in the future. Returns -1 if there was an error.
|
85
|
+
// timer in the future. Returns -1 if there was an error.
|
86
86
|
CZMQ_EXPORT int
|
87
87
|
zloop_timer (zloop_t *self, size_t delay, size_t times, zloop_timer_fn handler, void *arg);
|
88
88
|
|
89
89
|
// Cancel a specific timer identified by a specific timer_id (as returned by
|
90
|
-
// zloop_timer).
|
90
|
+
// zloop_timer).
|
91
91
|
CZMQ_EXPORT int
|
92
92
|
zloop_timer_end (zloop_t *self, int timer_id);
|
93
93
|
|
94
|
-
// Register a ticket timer. Ticket timers are very fast in the case where
|
95
|
-
// you use a lot of timers (thousands), and frequently remove and add them.
|
96
|
-
// The main use case is expiry timers for servers that handle many clients,
|
94
|
+
// Register a ticket timer. Ticket timers are very fast in the case where
|
95
|
+
// you use a lot of timers (thousands), and frequently remove and add them.
|
96
|
+
// The main use case is expiry timers for servers that handle many clients,
|
97
97
|
// and which reset the expiry timer for each message received from a client.
|
98
|
-
// Whereas normal timers perform poorly as the number of clients grows, the
|
99
|
-
// cost of ticket timers is constant, no matter the number of clients. You
|
100
|
-
// must set the ticket delay using zloop_set_ticket_delay before creating a
|
101
|
-
// ticket. Returns a handle to the timer that you should use in
|
102
|
-
// zloop_ticket_reset and zloop_ticket_delete.
|
98
|
+
// Whereas normal timers perform poorly as the number of clients grows, the
|
99
|
+
// cost of ticket timers is constant, no matter the number of clients. You
|
100
|
+
// must set the ticket delay using zloop_set_ticket_delay before creating a
|
101
|
+
// ticket. Returns a handle to the timer that you should use in
|
102
|
+
// zloop_ticket_reset and zloop_ticket_delete.
|
103
103
|
CZMQ_EXPORT void *
|
104
104
|
zloop_ticket (zloop_t *self, zloop_timer_fn handler, void *arg);
|
105
105
|
|
106
106
|
// Reset a ticket timer, which moves it to the end of the ticket list and
|
107
|
-
// resets its execution time. This is a very fast operation.
|
107
|
+
// resets its execution time. This is a very fast operation.
|
108
108
|
CZMQ_EXPORT void
|
109
109
|
zloop_ticket_reset (zloop_t *self, void *handle);
|
110
110
|
|
111
|
-
// Delete a ticket timer. We do not actually delete the ticket here, as
|
111
|
+
// Delete a ticket timer. We do not actually delete the ticket here, as
|
112
112
|
// other code may still refer to the ticket. We mark as deleted, and remove
|
113
|
-
// later and safely.
|
113
|
+
// later and safely.
|
114
114
|
CZMQ_EXPORT void
|
115
115
|
zloop_ticket_delete (zloop_t *self, void *handle);
|
116
116
|
|
117
|
-
// Set the ticket delay, which applies to all tickets. If you lower the
|
117
|
+
// Set the ticket delay, which applies to all tickets. If you lower the
|
118
118
|
// delay and there are already tickets created, the results are undefined.
|
119
119
|
CZMQ_EXPORT void
|
120
120
|
zloop_set_ticket_delay (zloop_t *self, size_t ticket_delay);
|
121
121
|
|
122
|
-
// Set hard limit on number of timers allowed. Setting more than a small
|
122
|
+
// Set hard limit on number of timers allowed. Setting more than a small
|
123
123
|
// number of timers (10-100) can have a dramatic impact on the performance
|
124
|
-
// of the reactor. For high-volume cases, use ticket timers. If the hard
|
125
|
-
// limit is reached, the reactor stops creating new timers and logs an
|
126
|
-
// error.
|
124
|
+
// of the reactor. For high-volume cases, use ticket timers. If the hard
|
125
|
+
// limit is reached, the reactor stops creating new timers and logs an
|
126
|
+
// error.
|
127
127
|
CZMQ_EXPORT void
|
128
128
|
zloop_set_max_timers (zloop_t *self, size_t max_timers);
|
129
129
|
|
130
130
|
// Set verbose tracing of reactor on/off. The default verbose setting is
|
131
|
-
// off (false).
|
131
|
+
// off (false).
|
132
132
|
CZMQ_EXPORT void
|
133
133
|
zloop_set_verbose (zloop_t *self, bool verbose);
|
134
134
|
|
135
|
-
// By default the reactor stops if the process receives a SIGINT or SIGTERM
|
135
|
+
// By default the reactor stops if the process receives a SIGINT or SIGTERM
|
136
136
|
// signal. This makes it impossible to shut-down message based architectures
|
137
137
|
// like zactors. This method lets you switch off break handling. The default
|
138
|
-
// nonstop setting is off (false).
|
138
|
+
// nonstop setting is off (false).
|
139
139
|
CZMQ_EXPORT void
|
140
140
|
zloop_set_nonstop (zloop_t *self, bool nonstop);
|
141
141
|
|
142
|
-
// Start the reactor. Takes control of the thread and returns when the 0MQ
|
142
|
+
// Start the reactor. Takes control of the thread and returns when the 0MQ
|
143
143
|
// context is terminated or the process is interrupted, or any event handler
|
144
|
-
// returns -1. Event handlers may register new sockets and timers, and
|
145
|
-
// cancel sockets. Returns 0 if interrupted, -1 if canceled by a handler.
|
144
|
+
// returns -1. Event handlers may register new sockets and timers, and
|
145
|
+
// cancel sockets. Returns 0 if interrupted, -1 if canceled by a handler.
|
146
146
|
CZMQ_EXPORT int
|
147
147
|
zloop_start (zloop_t *self);
|
148
148
|
|