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,194 @@
|
|
1
|
+
################################################################################
|
2
|
+
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
|
3
|
+
# Read the zproject/README.md for information about making permanent changes. #
|
4
|
+
################################################################################
|
5
|
+
|
6
|
+
module CZMQ
|
7
|
+
module FFI
|
8
|
+
|
9
|
+
# event-driven reactor
|
10
|
+
# @note This class is 100% generated using zproject.
|
11
|
+
class Zpoller
|
12
|
+
# Raised when one tries to use an instance of {Zpoller} after
|
13
|
+
# the internal pointer to the native object has been nullified.
|
14
|
+
class DestroyedError < RuntimeError; end
|
15
|
+
|
16
|
+
# Boilerplate for self pointer, initializer, and finalizer
|
17
|
+
class << self
|
18
|
+
alias :__new :new
|
19
|
+
end
|
20
|
+
# Attaches the pointer _ptr_ to this instance and defines a finalizer for
|
21
|
+
# it if necessary.
|
22
|
+
# @param ptr [::FFI::Pointer]
|
23
|
+
# @param finalize [Boolean]
|
24
|
+
def initialize(ptr, finalize = true)
|
25
|
+
@ptr = ptr
|
26
|
+
if @ptr.null?
|
27
|
+
@ptr = nil # Remove null pointers so we don't have to test for them.
|
28
|
+
elsif finalize
|
29
|
+
@finalizer = self.class.create_finalizer_for @ptr
|
30
|
+
ObjectSpace.define_finalizer self, @finalizer
|
31
|
+
end
|
32
|
+
end
|
33
|
+
# @param ptr [::FFI::Pointer]
|
34
|
+
# @return [Proc]
|
35
|
+
def self.create_finalizer_for(ptr)
|
36
|
+
Proc.new do
|
37
|
+
ptr_ptr = ::FFI::MemoryPointer.new :pointer
|
38
|
+
ptr_ptr.write_pointer ptr
|
39
|
+
::CZMQ::FFI.zpoller_destroy ptr_ptr
|
40
|
+
end
|
41
|
+
end
|
42
|
+
# @return [Boolean]
|
43
|
+
def null?
|
44
|
+
!@ptr or @ptr.null?
|
45
|
+
end
|
46
|
+
# Return internal pointer
|
47
|
+
# @return [::FFI::Pointer]
|
48
|
+
def __ptr
|
49
|
+
raise DestroyedError unless @ptr
|
50
|
+
@ptr
|
51
|
+
end
|
52
|
+
# So external Libraries can just pass the Object to a FFI function which expects a :pointer
|
53
|
+
alias_method :to_ptr, :__ptr
|
54
|
+
# Nullify internal pointer and return pointer pointer.
|
55
|
+
# @note This detaches the current instance from the native object
|
56
|
+
# and thus makes it unusable.
|
57
|
+
# @return [::FFI::MemoryPointer] the pointer pointing to a pointer
|
58
|
+
# pointing to the native object
|
59
|
+
def __ptr_give_ref
|
60
|
+
raise DestroyedError unless @ptr
|
61
|
+
ptr_ptr = ::FFI::MemoryPointer.new :pointer
|
62
|
+
ptr_ptr.write_pointer @ptr
|
63
|
+
__undef_finalizer if @finalizer
|
64
|
+
@ptr = nil
|
65
|
+
ptr_ptr
|
66
|
+
end
|
67
|
+
# Undefines the finalizer for this object.
|
68
|
+
# @note Only use this if you need to and can guarantee that the native
|
69
|
+
# object will be freed by other means.
|
70
|
+
# @return [void]
|
71
|
+
def __undef_finalizer
|
72
|
+
ObjectSpace.undefine_finalizer self
|
73
|
+
@finalizer = nil
|
74
|
+
end
|
75
|
+
|
76
|
+
# Create new poller, specifying zero or more readers. The list of
|
77
|
+
# readers ends in a NULL. Each reader can be a zsock_t instance, a
|
78
|
+
# zactor_t instance, a libzmq socket (void *), or a file handle.
|
79
|
+
# @param reader [::FFI::Pointer, #to_ptr]
|
80
|
+
# @param args [Array<Object>]
|
81
|
+
# @return [CZMQ::Zpoller]
|
82
|
+
def self.new(reader, *args)
|
83
|
+
ptr = ::CZMQ::FFI.zpoller_new(reader, *args)
|
84
|
+
__new ptr
|
85
|
+
end
|
86
|
+
|
87
|
+
# Destroy a poller
|
88
|
+
#
|
89
|
+
# @return [void]
|
90
|
+
def destroy()
|
91
|
+
return unless @ptr
|
92
|
+
self_p = __ptr_give_ref
|
93
|
+
result = ::CZMQ::FFI.zpoller_destroy(self_p)
|
94
|
+
result
|
95
|
+
end
|
96
|
+
|
97
|
+
# Add a reader to be polled. Returns 0 if OK, -1 on failure. The reader may
|
98
|
+
# be a libzmq void * socket, a zsock_t instance, or a zactor_t instance.
|
99
|
+
#
|
100
|
+
# @param reader [::FFI::Pointer, #to_ptr]
|
101
|
+
# @return [Integer]
|
102
|
+
def add(reader)
|
103
|
+
raise DestroyedError unless @ptr
|
104
|
+
self_p = @ptr
|
105
|
+
result = ::CZMQ::FFI.zpoller_add(self_p, reader)
|
106
|
+
result
|
107
|
+
end
|
108
|
+
|
109
|
+
# Remove a reader from the poller; returns 0 if OK, -1 on failure. The reader
|
110
|
+
# must have been passed during construction, or in an zpoller_add () call.
|
111
|
+
#
|
112
|
+
# @param reader [::FFI::Pointer, #to_ptr]
|
113
|
+
# @return [Integer]
|
114
|
+
def remove(reader)
|
115
|
+
raise DestroyedError unless @ptr
|
116
|
+
self_p = @ptr
|
117
|
+
result = ::CZMQ::FFI.zpoller_remove(self_p, reader)
|
118
|
+
result
|
119
|
+
end
|
120
|
+
|
121
|
+
# By default the poller stops if the process receives a SIGINT or SIGTERM
|
122
|
+
# signal. This makes it impossible to shut-down message based architectures
|
123
|
+
# like zactors. This method lets you switch off break handling. The default
|
124
|
+
# nonstop setting is off (false).
|
125
|
+
#
|
126
|
+
# @param nonstop [Boolean]
|
127
|
+
# @return [void]
|
128
|
+
def set_nonstop(nonstop)
|
129
|
+
raise DestroyedError unless @ptr
|
130
|
+
self_p = @ptr
|
131
|
+
nonstop = !(0==nonstop||!nonstop) # boolean
|
132
|
+
result = ::CZMQ::FFI.zpoller_set_nonstop(self_p, nonstop)
|
133
|
+
result
|
134
|
+
end
|
135
|
+
|
136
|
+
# Poll the registered readers for I/O, return first reader that has input.
|
137
|
+
# The reader will be a libzmq void * socket, or a zsock_t or zactor_t
|
138
|
+
# instance as specified in zpoller_new/zpoller_add. The timeout should be
|
139
|
+
# zero or greater, or -1 to wait indefinitely. Socket priority is defined
|
140
|
+
# by their order in the poll list. If you need a balanced poll, use the low
|
141
|
+
# level zmq_poll method directly. If the poll call was interrupted (SIGINT),
|
142
|
+
# or the ZMQ context was destroyed, or the timeout expired, returns NULL.
|
143
|
+
# You can test the actual exit condition by calling zpoller_expired () and
|
144
|
+
# zpoller_terminated (). The timeout is in msec.
|
145
|
+
#
|
146
|
+
# @param timeout [Integer, #to_int, #to_i]
|
147
|
+
# @return [::FFI::Pointer]
|
148
|
+
def wait(timeout)
|
149
|
+
raise DestroyedError unless @ptr
|
150
|
+
self_p = @ptr
|
151
|
+
timeout = Integer(timeout)
|
152
|
+
result = ::CZMQ::FFI.zpoller_wait(self_p, timeout)
|
153
|
+
result
|
154
|
+
end
|
155
|
+
|
156
|
+
# Return true if the last zpoller_wait () call ended because the timeout
|
157
|
+
# expired, without any error.
|
158
|
+
#
|
159
|
+
# @return [Boolean]
|
160
|
+
def expired()
|
161
|
+
raise DestroyedError unless @ptr
|
162
|
+
self_p = @ptr
|
163
|
+
result = ::CZMQ::FFI.zpoller_expired(self_p)
|
164
|
+
result
|
165
|
+
end
|
166
|
+
|
167
|
+
# Return true if the last zpoller_wait () call ended because the process
|
168
|
+
# was interrupted, or the parent context was destroyed.
|
169
|
+
#
|
170
|
+
# @return [Boolean]
|
171
|
+
def terminated()
|
172
|
+
raise DestroyedError unless @ptr
|
173
|
+
self_p = @ptr
|
174
|
+
result = ::CZMQ::FFI.zpoller_terminated(self_p)
|
175
|
+
result
|
176
|
+
end
|
177
|
+
|
178
|
+
# Self test of this class.
|
179
|
+
#
|
180
|
+
# @param verbose [Boolean]
|
181
|
+
# @return [void]
|
182
|
+
def self.test(verbose)
|
183
|
+
verbose = !(0==verbose||!verbose) # boolean
|
184
|
+
result = ::CZMQ::FFI.zpoller_test(verbose)
|
185
|
+
result
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
################################################################################
|
192
|
+
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
|
193
|
+
# Read the zproject/README.md for information about making permanent changes. #
|
194
|
+
################################################################################
|
@@ -0,0 +1,294 @@
|
|
1
|
+
################################################################################
|
2
|
+
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
|
3
|
+
# Read the zproject/README.md for information about making permanent changes. #
|
4
|
+
################################################################################
|
5
|
+
|
6
|
+
module CZMQ
|
7
|
+
module FFI
|
8
|
+
|
9
|
+
# process configuration and status
|
10
|
+
# @note This class is 100% generated using zproject.
|
11
|
+
class Zproc
|
12
|
+
# Raised when one tries to use an instance of {Zproc} after
|
13
|
+
# the internal pointer to the native object has been nullified.
|
14
|
+
class DestroyedError < RuntimeError; end
|
15
|
+
|
16
|
+
# Boilerplate for self pointer, initializer, and finalizer
|
17
|
+
class << self
|
18
|
+
alias :__new :new
|
19
|
+
end
|
20
|
+
# Attaches the pointer _ptr_ to this instance and defines a finalizer for
|
21
|
+
# it if necessary.
|
22
|
+
# @param ptr [::FFI::Pointer]
|
23
|
+
# @param finalize [Boolean]
|
24
|
+
def initialize(ptr, finalize = true)
|
25
|
+
@ptr = ptr
|
26
|
+
if @ptr.null?
|
27
|
+
@ptr = nil # Remove null pointers so we don't have to test for them.
|
28
|
+
elsif finalize
|
29
|
+
@finalizer = self.class.create_finalizer_for @ptr
|
30
|
+
ObjectSpace.define_finalizer self, @finalizer
|
31
|
+
end
|
32
|
+
end
|
33
|
+
# @return [Proc]
|
34
|
+
def self.create_finalizer_for(ptr)
|
35
|
+
Proc.new do
|
36
|
+
"WARNING: "\
|
37
|
+
"Objects of type #{self} cannot be destroyed implicitly. "\
|
38
|
+
"Please call the correct destroy method with the relevant arguments."
|
39
|
+
end
|
40
|
+
end
|
41
|
+
# @return [Boolean]
|
42
|
+
def null?
|
43
|
+
!@ptr or @ptr.null?
|
44
|
+
end
|
45
|
+
# Return internal pointer
|
46
|
+
# @return [::FFI::Pointer]
|
47
|
+
def __ptr
|
48
|
+
raise DestroyedError unless @ptr
|
49
|
+
@ptr
|
50
|
+
end
|
51
|
+
# So external Libraries can just pass the Object to a FFI function which expects a :pointer
|
52
|
+
alias_method :to_ptr, :__ptr
|
53
|
+
# Nullify internal pointer and return pointer pointer.
|
54
|
+
# @note This detaches the current instance from the native object
|
55
|
+
# and thus makes it unusable.
|
56
|
+
# @return [::FFI::MemoryPointer] the pointer pointing to a pointer
|
57
|
+
# pointing to the native object
|
58
|
+
def __ptr_give_ref
|
59
|
+
raise DestroyedError unless @ptr
|
60
|
+
ptr_ptr = ::FFI::MemoryPointer.new :pointer
|
61
|
+
ptr_ptr.write_pointer @ptr
|
62
|
+
__undef_finalizer if @finalizer
|
63
|
+
@ptr = nil
|
64
|
+
ptr_ptr
|
65
|
+
end
|
66
|
+
# Undefines the finalizer for this object.
|
67
|
+
# @note Only use this if you need to and can guarantee that the native
|
68
|
+
# object will be freed by other means.
|
69
|
+
# @return [void]
|
70
|
+
def __undef_finalizer
|
71
|
+
ObjectSpace.undefine_finalizer self
|
72
|
+
@finalizer = nil
|
73
|
+
end
|
74
|
+
|
75
|
+
# Returns CZMQ version as a single 6-digit integer encoding the major
|
76
|
+
# version (x 10000), the minor version (x 100) and the patch.
|
77
|
+
#
|
78
|
+
# @return [Integer]
|
79
|
+
def self.czmq_version()
|
80
|
+
result = ::CZMQ::FFI.zproc_czmq_version()
|
81
|
+
result
|
82
|
+
end
|
83
|
+
|
84
|
+
# Returns true if the process received a SIGINT or SIGTERM signal.
|
85
|
+
# It is good practice to use this method to exit any infinite loop
|
86
|
+
# processing messages.
|
87
|
+
#
|
88
|
+
# @return [Boolean]
|
89
|
+
def self.interrupted()
|
90
|
+
result = ::CZMQ::FFI.zproc_interrupted()
|
91
|
+
result
|
92
|
+
end
|
93
|
+
|
94
|
+
# Returns true if the underlying libzmq supports CURVE security.
|
95
|
+
#
|
96
|
+
# @return [Boolean]
|
97
|
+
def self.has_curve()
|
98
|
+
result = ::CZMQ::FFI.zproc_has_curve()
|
99
|
+
result
|
100
|
+
end
|
101
|
+
|
102
|
+
# Return current host name, for use in public tcp:// endpoints.
|
103
|
+
# If the host name is not resolvable, returns NULL.
|
104
|
+
#
|
105
|
+
# @return [::FFI::AutoPointer]
|
106
|
+
def self.hostname()
|
107
|
+
result = ::CZMQ::FFI.zproc_hostname()
|
108
|
+
result = ::FFI::AutoPointer.new(result, LibC.method(:free))
|
109
|
+
result
|
110
|
+
end
|
111
|
+
|
112
|
+
# Move the current process into the background. The precise effect
|
113
|
+
# depends on the operating system. On POSIX boxes, moves to a specified
|
114
|
+
# working directory (if specified), closes all file handles, reopens
|
115
|
+
# stdin, stdout, and stderr to the null device, and sets the process to
|
116
|
+
# ignore SIGHUP. On Windows, does nothing. Returns 0 if OK, -1 if there
|
117
|
+
# was an error.
|
118
|
+
#
|
119
|
+
# @param workdir [String, #to_s, nil]
|
120
|
+
# @return [void]
|
121
|
+
def self.daemonize(workdir)
|
122
|
+
result = ::CZMQ::FFI.zproc_daemonize(workdir)
|
123
|
+
result
|
124
|
+
end
|
125
|
+
|
126
|
+
# Drop the process ID into the lockfile, with exclusive lock, and
|
127
|
+
# switch the process to the specified group and/or user. Any of the
|
128
|
+
# arguments may be null, indicating a no-op. Returns 0 on success,
|
129
|
+
# -1 on failure. Note if you combine this with zsys_daemonize, run
|
130
|
+
# after, not before that method, or the lockfile will hold the wrong
|
131
|
+
# process ID.
|
132
|
+
#
|
133
|
+
# @param lockfile [String, #to_s, nil]
|
134
|
+
# @param group [String, #to_s, nil]
|
135
|
+
# @param user [String, #to_s, nil]
|
136
|
+
# @return [void]
|
137
|
+
def self.run_as(lockfile, group, user)
|
138
|
+
result = ::CZMQ::FFI.zproc_run_as(lockfile, group, user)
|
139
|
+
result
|
140
|
+
end
|
141
|
+
|
142
|
+
# Configure the number of I/O threads that ZeroMQ will use. A good
|
143
|
+
# rule of thumb is one thread per gigabit of traffic in or out. The
|
144
|
+
# default is 1, sufficient for most applications. If the environment
|
145
|
+
# variable ZSYS_IO_THREADS is defined, that provides the default.
|
146
|
+
# Note that this method is valid only before any socket is created.
|
147
|
+
#
|
148
|
+
# @param io_threads [Integer, #to_int, #to_i]
|
149
|
+
# @return [void]
|
150
|
+
def self.set_io_threads(io_threads)
|
151
|
+
io_threads = Integer(io_threads)
|
152
|
+
result = ::CZMQ::FFI.zproc_set_io_threads(io_threads)
|
153
|
+
result
|
154
|
+
end
|
155
|
+
|
156
|
+
# Configure the number of sockets that ZeroMQ will allow. The default
|
157
|
+
# is 1024. The actual limit depends on the system, and you can query it
|
158
|
+
# by using zsys_socket_limit (). A value of zero means "maximum".
|
159
|
+
# Note that this method is valid only before any socket is created.
|
160
|
+
#
|
161
|
+
# @param max_sockets [Integer, #to_int, #to_i]
|
162
|
+
# @return [void]
|
163
|
+
def self.set_max_sockets(max_sockets)
|
164
|
+
max_sockets = Integer(max_sockets)
|
165
|
+
result = ::CZMQ::FFI.zproc_set_max_sockets(max_sockets)
|
166
|
+
result
|
167
|
+
end
|
168
|
+
|
169
|
+
# Set network interface name to use for broadcasts, particularly zbeacon.
|
170
|
+
# This lets the interface be configured for test environments where required.
|
171
|
+
# For example, on Mac OS X, zbeacon cannot bind to 255.255.255.255 which is
|
172
|
+
# the default when there is no specified interface. If the environment
|
173
|
+
# variable ZSYS_INTERFACE is set, use that as the default interface name.
|
174
|
+
# Setting the interface to "*" means "use all available interfaces".
|
175
|
+
#
|
176
|
+
# @param value [String, #to_s, nil]
|
177
|
+
# @return [void]
|
178
|
+
def self.set_biface(value)
|
179
|
+
result = ::CZMQ::FFI.zproc_set_biface(value)
|
180
|
+
result
|
181
|
+
end
|
182
|
+
|
183
|
+
# Return network interface to use for broadcasts, or "" if none was set.
|
184
|
+
#
|
185
|
+
# @return [String]
|
186
|
+
def self.biface()
|
187
|
+
result = ::CZMQ::FFI.zproc_biface()
|
188
|
+
result
|
189
|
+
end
|
190
|
+
|
191
|
+
# Set log identity, which is a string that prefixes all log messages sent
|
192
|
+
# by this process. The log identity defaults to the environment variable
|
193
|
+
# ZSYS_LOGIDENT, if that is set.
|
194
|
+
#
|
195
|
+
# @param value [String, #to_s, nil]
|
196
|
+
# @return [void]
|
197
|
+
def self.set_log_ident(value)
|
198
|
+
result = ::CZMQ::FFI.zproc_set_log_ident(value)
|
199
|
+
result
|
200
|
+
end
|
201
|
+
|
202
|
+
# Sends log output to a PUB socket bound to the specified endpoint. To
|
203
|
+
# collect such log output, create a SUB socket, subscribe to the traffic
|
204
|
+
# you care about, and connect to the endpoint. Log traffic is sent as a
|
205
|
+
# single string frame, in the same format as when sent to stdout. The
|
206
|
+
# log system supports a single sender; multiple calls to this method will
|
207
|
+
# bind the same sender to multiple endpoints. To disable the sender, call
|
208
|
+
# this method with a null argument.
|
209
|
+
#
|
210
|
+
# @param endpoint [String, #to_s, nil]
|
211
|
+
# @return [void]
|
212
|
+
def self.set_log_sender(endpoint)
|
213
|
+
result = ::CZMQ::FFI.zproc_set_log_sender(endpoint)
|
214
|
+
result
|
215
|
+
end
|
216
|
+
|
217
|
+
# Enable or disable logging to the system facility (syslog on POSIX boxes,
|
218
|
+
# event log on Windows). By default this is disabled.
|
219
|
+
#
|
220
|
+
# @param logsystem [Boolean]
|
221
|
+
# @return [void]
|
222
|
+
def self.set_log_system(logsystem)
|
223
|
+
logsystem = !(0==logsystem||!logsystem) # boolean
|
224
|
+
result = ::CZMQ::FFI.zproc_set_log_system(logsystem)
|
225
|
+
result
|
226
|
+
end
|
227
|
+
|
228
|
+
# Log error condition - highest priority
|
229
|
+
#
|
230
|
+
# @param format [String, #to_s, nil]
|
231
|
+
# @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
|
232
|
+
# @return [void]
|
233
|
+
def self.log_error(format, *args)
|
234
|
+
result = ::CZMQ::FFI.zproc_log_error(format, *args)
|
235
|
+
result
|
236
|
+
end
|
237
|
+
|
238
|
+
# Log warning condition - high priority
|
239
|
+
#
|
240
|
+
# @param format [String, #to_s, nil]
|
241
|
+
# @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
|
242
|
+
# @return [void]
|
243
|
+
def self.log_warning(format, *args)
|
244
|
+
result = ::CZMQ::FFI.zproc_log_warning(format, *args)
|
245
|
+
result
|
246
|
+
end
|
247
|
+
|
248
|
+
# Log normal, but significant, condition - normal priority
|
249
|
+
#
|
250
|
+
# @param format [String, #to_s, nil]
|
251
|
+
# @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
|
252
|
+
# @return [void]
|
253
|
+
def self.log_notice(format, *args)
|
254
|
+
result = ::CZMQ::FFI.zproc_log_notice(format, *args)
|
255
|
+
result
|
256
|
+
end
|
257
|
+
|
258
|
+
# Log informational message - low priority
|
259
|
+
#
|
260
|
+
# @param format [String, #to_s, nil]
|
261
|
+
# @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
|
262
|
+
# @return [void]
|
263
|
+
def self.log_info(format, *args)
|
264
|
+
result = ::CZMQ::FFI.zproc_log_info(format, *args)
|
265
|
+
result
|
266
|
+
end
|
267
|
+
|
268
|
+
# Log debug-level message - lowest priority
|
269
|
+
#
|
270
|
+
# @param format [String, #to_s, nil]
|
271
|
+
# @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
|
272
|
+
# @return [void]
|
273
|
+
def self.log_debug(format, *args)
|
274
|
+
result = ::CZMQ::FFI.zproc_log_debug(format, *args)
|
275
|
+
result
|
276
|
+
end
|
277
|
+
|
278
|
+
# Self test of this class.
|
279
|
+
#
|
280
|
+
# @param verbose [Boolean]
|
281
|
+
# @return [void]
|
282
|
+
def self.test(verbose)
|
283
|
+
verbose = !(0==verbose||!verbose) # boolean
|
284
|
+
result = ::CZMQ::FFI.zproc_test(verbose)
|
285
|
+
result
|
286
|
+
end
|
287
|
+
end
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
################################################################################
|
292
|
+
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
|
293
|
+
# Read the zproject/README.md for information about making permanent changes. #
|
294
|
+
################################################################################
|