czmq-ffi-gen 0.9.1-x86-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. checksums.yaml +7 -0
  2. data/AUTHORS +1 -0
  3. data/CHANGES.md +88 -0
  4. data/Gemfile +2 -0
  5. data/LICENSE +14 -0
  6. data/README.md +112 -0
  7. data/lib/czmq-ffi-gen.rb +7 -0
  8. data/lib/czmq-ffi-gen/czmq/ffi.rb +1210 -0
  9. data/lib/czmq-ffi-gen/czmq/ffi/version.rb +15 -0
  10. data/lib/czmq-ffi-gen/czmq/ffi/zactor.rb +186 -0
  11. data/lib/czmq-ffi-gen/czmq/ffi/zarmour.rb +286 -0
  12. data/lib/czmq-ffi-gen/czmq/ffi/zcert.rb +307 -0
  13. data/lib/czmq-ffi-gen/czmq/ffi/zcertstore.rb +222 -0
  14. data/lib/czmq-ffi-gen/czmq/ffi/zchunk.rb +388 -0
  15. data/lib/czmq-ffi-gen/czmq/ffi/zclock.rb +140 -0
  16. data/lib/czmq-ffi-gen/czmq/ffi/zconfig.rb +442 -0
  17. data/lib/czmq-ffi-gen/czmq/ffi/zdigest.rb +156 -0
  18. data/lib/czmq-ffi-gen/czmq/ffi/zdir.rb +283 -0
  19. data/lib/czmq-ffi-gen/czmq/ffi/zdir_patch.rb +194 -0
  20. data/lib/czmq-ffi-gen/czmq/ffi/zfile.rb +353 -0
  21. data/lib/czmq-ffi-gen/czmq/ffi/zframe.rb +359 -0
  22. data/lib/czmq-ffi-gen/czmq/ffi/zhash.rb +416 -0
  23. data/lib/czmq-ffi-gen/czmq/ffi/zhashx.rb +659 -0
  24. data/lib/czmq-ffi-gen/czmq/ffi/ziflist.rb +189 -0
  25. data/lib/czmq-ffi-gen/czmq/ffi/zlist.rb +365 -0
  26. data/lib/czmq-ffi-gen/czmq/ffi/zlistx.rb +478 -0
  27. data/lib/czmq-ffi-gen/czmq/ffi/zloop.rb +396 -0
  28. data/lib/czmq-ffi-gen/czmq/ffi/zmsg.rb +515 -0
  29. data/lib/czmq-ffi-gen/czmq/ffi/zpoller.rb +194 -0
  30. data/lib/czmq-ffi-gen/czmq/ffi/zproc.rb +294 -0
  31. data/lib/czmq-ffi-gen/czmq/ffi/zsock.rb +3479 -0
  32. data/lib/czmq-ffi-gen/czmq/ffi/zstr.rb +203 -0
  33. data/lib/czmq-ffi-gen/czmq/ffi/ztimerset.rb +203 -0
  34. data/lib/czmq-ffi-gen/czmq/ffi/ztrie.rb +221 -0
  35. data/lib/czmq-ffi-gen/czmq/ffi/zuuid.rb +227 -0
  36. data/lib/czmq-ffi-gen/errors.rb +12 -0
  37. data/lib/czmq-ffi-gen/gem_version.rb +5 -0
  38. data/lib/czmq-ffi-gen/legacy.rb +16 -0
  39. data/lib/czmq-ffi-gen/libzmq.rb +18 -0
  40. data/lib/czmq-ffi-gen/signals.rb +27 -0
  41. data/lib/czmq-ffi-gen/vendor.rb +5 -0
  42. data/lib/czmq-ffi-gen/versions.rb +19 -0
  43. data/vendor/local/bin/inproc_lat.exe +0 -0
  44. data/vendor/local/bin/inproc_thr.exe +0 -0
  45. data/vendor/local/bin/libczmq.dll +0 -0
  46. data/vendor/local/bin/libgcc_s_sjlj-1.dll +0 -0
  47. data/vendor/local/bin/libstdc++-6.dll +0 -0
  48. data/vendor/local/bin/libzmq.dll +0 -0
  49. data/vendor/local/bin/local_lat.exe +0 -0
  50. data/vendor/local/bin/local_thr.exe +0 -0
  51. data/vendor/local/bin/remote_lat.exe +0 -0
  52. data/vendor/local/bin/remote_thr.exe +0 -0
  53. data/vendor/local/include/czmq.h +31 -0
  54. data/vendor/local/include/czmq_library.h +199 -0
  55. data/vendor/local/include/czmq_prelude.h +641 -0
  56. data/vendor/local/include/readme.txt +83 -0
  57. data/vendor/local/include/sha1.h +76 -0
  58. data/vendor/local/include/sha1.inc_c +335 -0
  59. data/vendor/local/include/slre.h +92 -0
  60. data/vendor/local/include/slre.inc_c +660 -0
  61. data/vendor/local/include/zactor.h +76 -0
  62. data/vendor/local/include/zarmour.h +114 -0
  63. data/vendor/local/include/zauth.h +100 -0
  64. data/vendor/local/include/zauth_v2.h +88 -0
  65. data/vendor/local/include/zbeacon.h +86 -0
  66. data/vendor/local/include/zbeacon_v2.h +75 -0
  67. data/vendor/local/include/zcert.h +136 -0
  68. data/vendor/local/include/zcertstore.h +100 -0
  69. data/vendor/local/include/zchunk.h +163 -0
  70. data/vendor/local/include/zclock.h +73 -0
  71. data/vendor/local/include/zconfig.h +185 -0
  72. data/vendor/local/include/zctx.h +107 -0
  73. data/vendor/local/include/zdigest.h +65 -0
  74. data/vendor/local/include/zdir.h +149 -0
  75. data/vendor/local/include/zdir_patch.h +82 -0
  76. data/vendor/local/include/zfile.h +177 -0
  77. data/vendor/local/include/zframe.h +176 -0
  78. data/vendor/local/include/zgossip.h +95 -0
  79. data/vendor/local/include/zgossip_engine.inc +927 -0
  80. data/vendor/local/include/zgossip_msg.h +129 -0
  81. data/vendor/local/include/zhash.h +195 -0
  82. data/vendor/local/include/zhash_primes.inc +329 -0
  83. data/vendor/local/include/zhashx.h +298 -0
  84. data/vendor/local/include/ziflist.h +77 -0
  85. data/vendor/local/include/zlist.h +158 -0
  86. data/vendor/local/include/zlistx.h +205 -0
  87. data/vendor/local/include/zloop.h +168 -0
  88. data/vendor/local/include/zmonitor.h +73 -0
  89. data/vendor/local/include/zmonitor_v2.h +56 -0
  90. data/vendor/local/include/zmq.h +617 -0
  91. data/vendor/local/include/zmq_utils.h +48 -0
  92. data/vendor/local/include/zmsg.h +280 -0
  93. data/vendor/local/include/zmutex.h +55 -0
  94. data/vendor/local/include/zpoller.h +92 -0
  95. data/vendor/local/include/zproc.h +168 -0
  96. data/vendor/local/include/zproxy.h +111 -0
  97. data/vendor/local/include/zproxy_v2.h +62 -0
  98. data/vendor/local/include/zrex.h +82 -0
  99. data/vendor/local/include/zsock.h +912 -0
  100. data/vendor/local/include/zsock_option.inc +4126 -0
  101. data/vendor/local/include/zsocket.h +110 -0
  102. data/vendor/local/include/zsockopt.h +256 -0
  103. data/vendor/local/include/zstr.h +110 -0
  104. data/vendor/local/include/zsys.h +386 -0
  105. data/vendor/local/include/zthread.h +50 -0
  106. data/vendor/local/include/ztimerset.h +90 -0
  107. data/vendor/local/include/ztrie.h +106 -0
  108. data/vendor/local/include/zuuid.h +96 -0
  109. data/vendor/local/lib/libczmq.dll.a +0 -0
  110. data/vendor/local/lib/liblibzmq.dll.a +0 -0
  111. data/vendor/local/lib/libzmq-static.a +0 -0
  112. data/vendor/local/lib/pkgconfig/libczmq.pc +23 -0
  113. data/vendor/local/lib/pkgconfig/libzmq.pc +11 -0
  114. data/vendor/local/share/zmq/AUTHORS.txt +147 -0
  115. data/vendor/local/share/zmq/COPYING.LESSER.txt +181 -0
  116. data/vendor/local/share/zmq/COPYING.txt +674 -0
  117. data/vendor/local/share/zmq/NEWS.txt +978 -0
  118. 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
+ ################################################################################