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.
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,3479 @@
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
+ # high-level socket API that hides libzmq contexts and sockets
10
+ # @note This class is 100% generated using zproject.
11
+ class Zsock
12
+ # Raised when one tries to use an instance of {Zsock} 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.zsock_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 a new socket. Returns the new socket, or NULL if the new socket
77
+ # could not be created. Note that the symbol zsock_new (and other
78
+ # constructors/destructors for zsock) are redirected to the *_checked
79
+ # variant, enabling intelligent socket leak detection. This can have
80
+ # performance implications if you use a LOT of sockets. To turn off this
81
+ # redirection behaviour, define ZSOCK_NOCHECK.
82
+ # @param type [Integer, #to_int, #to_i]
83
+ # @return [CZMQ::Zsock]
84
+ def self.new(type)
85
+ type = Integer(type)
86
+ ptr = ::CZMQ::FFI.zsock_new(type)
87
+ __new ptr
88
+ end
89
+
90
+ # Create a PUB socket. Default action is bind.
91
+ # @param endpoint [String, #to_s, nil]
92
+ # @return [CZMQ::Zsock]
93
+ def self.new_pub(endpoint)
94
+ ptr = ::CZMQ::FFI.zsock_new_pub(endpoint)
95
+ __new ptr
96
+ end
97
+
98
+ # Create a SUB socket, and optionally subscribe to some prefix string. Default
99
+ # action is connect.
100
+ # @param endpoint [String, #to_s, nil]
101
+ # @param subscribe [String, #to_s, nil]
102
+ # @return [CZMQ::Zsock]
103
+ def self.new_sub(endpoint, subscribe)
104
+ ptr = ::CZMQ::FFI.zsock_new_sub(endpoint, subscribe)
105
+ __new ptr
106
+ end
107
+
108
+ # Create a REQ socket. Default action is connect.
109
+ # @param endpoint [String, #to_s, nil]
110
+ # @return [CZMQ::Zsock]
111
+ def self.new_req(endpoint)
112
+ ptr = ::CZMQ::FFI.zsock_new_req(endpoint)
113
+ __new ptr
114
+ end
115
+
116
+ # Create a REP socket. Default action is bind.
117
+ # @param endpoint [String, #to_s, nil]
118
+ # @return [CZMQ::Zsock]
119
+ def self.new_rep(endpoint)
120
+ ptr = ::CZMQ::FFI.zsock_new_rep(endpoint)
121
+ __new ptr
122
+ end
123
+
124
+ # Create a DEALER socket. Default action is connect.
125
+ # @param endpoint [String, #to_s, nil]
126
+ # @return [CZMQ::Zsock]
127
+ def self.new_dealer(endpoint)
128
+ ptr = ::CZMQ::FFI.zsock_new_dealer(endpoint)
129
+ __new ptr
130
+ end
131
+
132
+ # Create a ROUTER socket. Default action is bind.
133
+ # @param endpoint [String, #to_s, nil]
134
+ # @return [CZMQ::Zsock]
135
+ def self.new_router(endpoint)
136
+ ptr = ::CZMQ::FFI.zsock_new_router(endpoint)
137
+ __new ptr
138
+ end
139
+
140
+ # Create a PUSH socket. Default action is connect.
141
+ # @param endpoint [String, #to_s, nil]
142
+ # @return [CZMQ::Zsock]
143
+ def self.new_push(endpoint)
144
+ ptr = ::CZMQ::FFI.zsock_new_push(endpoint)
145
+ __new ptr
146
+ end
147
+
148
+ # Create a PULL socket. Default action is bind.
149
+ # @param endpoint [String, #to_s, nil]
150
+ # @return [CZMQ::Zsock]
151
+ def self.new_pull(endpoint)
152
+ ptr = ::CZMQ::FFI.zsock_new_pull(endpoint)
153
+ __new ptr
154
+ end
155
+
156
+ # Create an XPUB socket. Default action is bind.
157
+ # @param endpoint [String, #to_s, nil]
158
+ # @return [CZMQ::Zsock]
159
+ def self.new_xpub(endpoint)
160
+ ptr = ::CZMQ::FFI.zsock_new_xpub(endpoint)
161
+ __new ptr
162
+ end
163
+
164
+ # Create an XSUB socket. Default action is connect.
165
+ # @param endpoint [String, #to_s, nil]
166
+ # @return [CZMQ::Zsock]
167
+ def self.new_xsub(endpoint)
168
+ ptr = ::CZMQ::FFI.zsock_new_xsub(endpoint)
169
+ __new ptr
170
+ end
171
+
172
+ # Create a PAIR socket. Default action is connect.
173
+ # @param endpoint [String, #to_s, nil]
174
+ # @return [CZMQ::Zsock]
175
+ def self.new_pair(endpoint)
176
+ ptr = ::CZMQ::FFI.zsock_new_pair(endpoint)
177
+ __new ptr
178
+ end
179
+
180
+ # Create a STREAM socket. Default action is connect.
181
+ # @param endpoint [String, #to_s, nil]
182
+ # @return [CZMQ::Zsock]
183
+ def self.new_stream(endpoint)
184
+ ptr = ::CZMQ::FFI.zsock_new_stream(endpoint)
185
+ __new ptr
186
+ end
187
+
188
+ # Create a SERVER socket. Default action is bind.
189
+ # @param endpoint [String, #to_s, nil]
190
+ # @return [CZMQ::Zsock]
191
+ def self.new_server(endpoint)
192
+ ptr = ::CZMQ::FFI.zsock_new_server(endpoint)
193
+ __new ptr
194
+ end
195
+
196
+ # Create a CLIENT socket. Default action is connect.
197
+ # @param endpoint [String, #to_s, nil]
198
+ # @return [CZMQ::Zsock]
199
+ def self.new_client(endpoint)
200
+ ptr = ::CZMQ::FFI.zsock_new_client(endpoint)
201
+ __new ptr
202
+ end
203
+
204
+ # Create a RADIO socket. Default action is bind.
205
+ # @param endpoint [String, #to_s, nil]
206
+ # @return [CZMQ::Zsock]
207
+ def self.new_radio(endpoint)
208
+ ptr = ::CZMQ::FFI.zsock_new_radio(endpoint)
209
+ __new ptr
210
+ end
211
+
212
+ # Create a DISH socket. Default action is connect.
213
+ # @param endpoint [String, #to_s, nil]
214
+ # @return [CZMQ::Zsock]
215
+ def self.new_dish(endpoint)
216
+ ptr = ::CZMQ::FFI.zsock_new_dish(endpoint)
217
+ __new ptr
218
+ end
219
+
220
+ # Create a GATHER socket. Default action is bind.
221
+ # @param endpoint [String, #to_s, nil]
222
+ # @return [CZMQ::Zsock]
223
+ def self.new_gather(endpoint)
224
+ ptr = ::CZMQ::FFI.zsock_new_gather(endpoint)
225
+ __new ptr
226
+ end
227
+
228
+ # Create a SCATTER socket. Default action is connect.
229
+ # @param endpoint [String, #to_s, nil]
230
+ # @return [CZMQ::Zsock]
231
+ def self.new_scatter(endpoint)
232
+ ptr = ::CZMQ::FFI.zsock_new_scatter(endpoint)
233
+ __new ptr
234
+ end
235
+
236
+ # Destroy the socket. You must use this for any socket created via the
237
+ # zsock_new method.
238
+ #
239
+ # @return [void]
240
+ def destroy()
241
+ return unless @ptr
242
+ self_p = __ptr_give_ref
243
+ result = ::CZMQ::FFI.zsock_destroy(self_p)
244
+ result
245
+ end
246
+
247
+ # Bind a socket to a formatted endpoint. For tcp:// endpoints, supports
248
+ # ephemeral ports, if you specify the port number as "*". By default
249
+ # zsock uses the IANA designated range from C000 (49152) to FFFF (65535).
250
+ # To override this range, follow the "*" with "[first-last]". Either or
251
+ # both first and last may be empty. To bind to a random port within the
252
+ # range, use "!" in place of "*".
253
+ #
254
+ # Examples:
255
+ # tcp://127.0.0.1:* bind to first free port from C000 up
256
+ # tcp://127.0.0.1:! bind to random port from C000 to FFFF
257
+ # tcp://127.0.0.1:*[60000-] bind to first free port from 60000 up
258
+ # tcp://127.0.0.1:![-60000] bind to random port from C000 to 60000
259
+ # tcp://127.0.0.1:![55000-55999]
260
+ # bind to random port from 55000 to 55999
261
+ #
262
+ # On success, returns the actual port number used, for tcp:// endpoints,
263
+ # and 0 for other transports. On failure, returns -1. Note that when using
264
+ # ephemeral ports, a port may be reused by different services without
265
+ # clients being aware. Protocols that run on ephemeral ports should take
266
+ # this into account.
267
+ #
268
+ # @param format [String, #to_s, nil]
269
+ # @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
270
+ # @return [Integer]
271
+ def bind(format, *args)
272
+ raise DestroyedError unless @ptr
273
+ self_p = @ptr
274
+ result = ::CZMQ::FFI.zsock_bind(self_p, format, *args)
275
+ result
276
+ end
277
+
278
+ # Returns last bound endpoint, if any.
279
+ #
280
+ # @return [String]
281
+ def endpoint()
282
+ raise DestroyedError unless @ptr
283
+ self_p = @ptr
284
+ result = ::CZMQ::FFI.zsock_endpoint(self_p)
285
+ result
286
+ end
287
+
288
+ # Unbind a socket from a formatted endpoint.
289
+ # Returns 0 if OK, -1 if the endpoint was invalid or the function
290
+ # isn't supported.
291
+ #
292
+ # @param format [String, #to_s, nil]
293
+ # @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
294
+ # @return [Integer]
295
+ def unbind(format, *args)
296
+ raise DestroyedError unless @ptr
297
+ self_p = @ptr
298
+ result = ::CZMQ::FFI.zsock_unbind(self_p, format, *args)
299
+ result
300
+ end
301
+
302
+ # Connect a socket to a formatted endpoint
303
+ # Returns 0 if OK, -1 if the endpoint was invalid.
304
+ #
305
+ # @param format [String, #to_s, nil]
306
+ # @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
307
+ # @return [Integer]
308
+ def connect(format, *args)
309
+ raise DestroyedError unless @ptr
310
+ self_p = @ptr
311
+ result = ::CZMQ::FFI.zsock_connect(self_p, format, *args)
312
+ result
313
+ end
314
+
315
+ # Disconnect a socket from a formatted endpoint
316
+ # Returns 0 if OK, -1 if the endpoint was invalid or the function
317
+ # isn't supported.
318
+ #
319
+ # @param format [String, #to_s, nil]
320
+ # @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
321
+ # @return [Integer]
322
+ def disconnect(format, *args)
323
+ raise DestroyedError unless @ptr
324
+ self_p = @ptr
325
+ result = ::CZMQ::FFI.zsock_disconnect(self_p, format, *args)
326
+ result
327
+ end
328
+
329
+ # Attach a socket to zero or more endpoints. If endpoints is not null,
330
+ # parses as list of ZeroMQ endpoints, separated by commas, and prefixed by
331
+ # '@' (to bind the socket) or '>' (to connect the socket). Returns 0 if all
332
+ # endpoints were valid, or -1 if there was a syntax error. If the endpoint
333
+ # does not start with '@' or '>', the serverish argument defines whether
334
+ # it is used to bind (serverish = true) or connect (serverish = false).
335
+ #
336
+ # @param endpoints [String, #to_s, nil]
337
+ # @param serverish [Boolean]
338
+ # @return [Integer]
339
+ def attach(endpoints, serverish)
340
+ raise DestroyedError unless @ptr
341
+ self_p = @ptr
342
+ serverish = !(0==serverish||!serverish) # boolean
343
+ result = ::CZMQ::FFI.zsock_attach(self_p, endpoints, serverish)
344
+ result
345
+ end
346
+
347
+ # Returns socket type as printable constant string.
348
+ #
349
+ # @return [String]
350
+ def type_str()
351
+ raise DestroyedError unless @ptr
352
+ self_p = @ptr
353
+ result = ::CZMQ::FFI.zsock_type_str(self_p)
354
+ result
355
+ end
356
+
357
+ # Send a 'picture' message to the socket (or actor). The picture is a
358
+ # string that defines the type of each frame. This makes it easy to send
359
+ # a complex multiframe message in one call. The picture can contain any
360
+ # of these characters, each corresponding to one or two arguments:
361
+ #
362
+ # i = int (signed)
363
+ # 1 = uint8_t
364
+ # 2 = uint16_t
365
+ # 4 = uint32_t
366
+ # 8 = uint64_t
367
+ # s = char *
368
+ # b = byte *, size_t (2 arguments)
369
+ # c = zchunk_t *
370
+ # f = zframe_t *
371
+ # h = zhashx_t *
372
+ # U = zuuid_t *
373
+ # p = void * (sends the pointer value, only meaningful over inproc)
374
+ # m = zmsg_t * (sends all frames in the zmsg)
375
+ # z = sends zero-sized frame (0 arguments)
376
+ # u = uint (deprecated)
377
+ #
378
+ # Note that s, b, c, and f are encoded the same way and the choice is
379
+ # offered as a convenience to the sender, which may or may not already
380
+ # have data in a zchunk or zframe. Does not change or take ownership of
381
+ # any arguments. Returns 0 if successful, -1 if sending failed for any
382
+ # reason.
383
+ #
384
+ # @param picture [String, #to_s, nil]
385
+ # @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
386
+ # @return [Integer]
387
+ def send(picture, *args)
388
+ raise DestroyedError unless @ptr
389
+ self_p = @ptr
390
+ result = ::CZMQ::FFI.zsock_send(self_p, picture, *args)
391
+ result
392
+ end
393
+
394
+ # Send a 'picture' message to the socket (or actor). The picture is a
395
+ # string that defines the type of each frame. This makes it easy to send
396
+ # a complex multiframe message in one call. The picture can contain any
397
+ # of these characters, each corresponding to one or two arguments:
398
+ #
399
+ # i = int (signed)
400
+ # 1 = uint8_t
401
+ # 2 = uint16_t
402
+ # 4 = uint32_t
403
+ # 8 = uint64_t
404
+ # s = char *
405
+ # b = byte *, size_t (2 arguments)
406
+ # c = zchunk_t *
407
+ # f = zframe_t *
408
+ # h = zhashx_t *
409
+ # U = zuuid_t *
410
+ # p = void * (sends the pointer value, only meaningful over inproc)
411
+ # m = zmsg_t * (sends all frames in the zmsg)
412
+ # z = sends zero-sized frame (0 arguments)
413
+ # u = uint (deprecated)
414
+ #
415
+ # Note that s, b, c, and f are encoded the same way and the choice is
416
+ # offered as a convenience to the sender, which may or may not already
417
+ # have data in a zchunk or zframe. Does not change or take ownership of
418
+ # any arguments. Returns 0 if successful, -1 if sending failed for any
419
+ # reason.
420
+ #
421
+ # This is the polymorphic version of #send.
422
+ #
423
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
424
+ # object reference to use this method on
425
+ # @param picture [String, #to_s, nil]
426
+ # @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
427
+ # @return [Integer]
428
+ def self.send(self_p, picture, *args)
429
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
430
+ result = ::CZMQ::FFI.zsock_send(self_p, picture, *args)
431
+ result
432
+ end
433
+
434
+ # Send a 'picture' message to the socket (or actor). This is a va_list
435
+ # version of zsock_send (), so please consult its documentation for the
436
+ # details.
437
+ #
438
+ # @param picture [String, #to_s, nil]
439
+ # @param argptr [::FFI::Pointer, #to_ptr]
440
+ # @return [Integer]
441
+ def vsend(picture, argptr)
442
+ raise DestroyedError unless @ptr
443
+ self_p = @ptr
444
+ result = ::CZMQ::FFI.zsock_vsend(self_p, picture, argptr)
445
+ result
446
+ end
447
+
448
+ # Send a 'picture' message to the socket (or actor). This is a va_list
449
+ # version of zsock_send (), so please consult its documentation for the
450
+ # details.
451
+ #
452
+ # This is the polymorphic version of #vsend.
453
+ #
454
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
455
+ # object reference to use this method on
456
+ # @param picture [String, #to_s, nil]
457
+ # @param argptr [::FFI::Pointer, #to_ptr]
458
+ # @return [Integer]
459
+ def self.vsend(self_p, picture, argptr)
460
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
461
+ result = ::CZMQ::FFI.zsock_vsend(self_p, picture, argptr)
462
+ result
463
+ end
464
+
465
+ # Receive a 'picture' message to the socket (or actor). See zsock_send for
466
+ # the format and meaning of the picture. Returns the picture elements into
467
+ # a series of pointers as provided by the caller:
468
+ #
469
+ # i = int * (stores signed integer)
470
+ # 4 = uint32_t * (stores 32-bit unsigned integer)
471
+ # 8 = uint64_t * (stores 64-bit unsigned integer)
472
+ # s = char ** (allocates new string)
473
+ # b = byte **, size_t * (2 arguments) (allocates memory)
474
+ # c = zchunk_t ** (creates zchunk)
475
+ # f = zframe_t ** (creates zframe)
476
+ # U = zuuid_t * (creates a zuuid with the data)
477
+ # h = zhashx_t ** (creates zhashx)
478
+ # p = void ** (stores pointer)
479
+ # m = zmsg_t ** (creates a zmsg with the remaing frames)
480
+ # z = null, asserts empty frame (0 arguments)
481
+ # u = uint * (stores unsigned integer, deprecated)
482
+ #
483
+ # Note that zsock_recv creates the returned objects, and the caller must
484
+ # destroy them when finished with them. The supplied pointers do not need
485
+ # to be initialized. Returns 0 if successful, or -1 if it failed to recv
486
+ # a message, in which case the pointers are not modified. When message
487
+ # frames are truncated (a short message), sets return values to zero/null.
488
+ # If an argument pointer is NULL, does not store any value (skips it).
489
+ # An 'n' picture matches an empty frame; if the message does not match,
490
+ # the method will return -1.
491
+ #
492
+ # @param picture [String, #to_s, nil]
493
+ # @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
494
+ # @return [Integer]
495
+ def recv(picture, *args)
496
+ raise DestroyedError unless @ptr
497
+ self_p = @ptr
498
+ result = ::CZMQ::FFI.zsock_recv(self_p, picture, *args)
499
+ result
500
+ end
501
+
502
+ # Receive a 'picture' message to the socket (or actor). See zsock_send for
503
+ # the format and meaning of the picture. Returns the picture elements into
504
+ # a series of pointers as provided by the caller:
505
+ #
506
+ # i = int * (stores signed integer)
507
+ # 4 = uint32_t * (stores 32-bit unsigned integer)
508
+ # 8 = uint64_t * (stores 64-bit unsigned integer)
509
+ # s = char ** (allocates new string)
510
+ # b = byte **, size_t * (2 arguments) (allocates memory)
511
+ # c = zchunk_t ** (creates zchunk)
512
+ # f = zframe_t ** (creates zframe)
513
+ # U = zuuid_t * (creates a zuuid with the data)
514
+ # h = zhashx_t ** (creates zhashx)
515
+ # p = void ** (stores pointer)
516
+ # m = zmsg_t ** (creates a zmsg with the remaing frames)
517
+ # z = null, asserts empty frame (0 arguments)
518
+ # u = uint * (stores unsigned integer, deprecated)
519
+ #
520
+ # Note that zsock_recv creates the returned objects, and the caller must
521
+ # destroy them when finished with them. The supplied pointers do not need
522
+ # to be initialized. Returns 0 if successful, or -1 if it failed to recv
523
+ # a message, in which case the pointers are not modified. When message
524
+ # frames are truncated (a short message), sets return values to zero/null.
525
+ # If an argument pointer is NULL, does not store any value (skips it).
526
+ # An 'n' picture matches an empty frame; if the message does not match,
527
+ # the method will return -1.
528
+ #
529
+ # This is the polymorphic version of #recv.
530
+ #
531
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
532
+ # object reference to use this method on
533
+ # @param picture [String, #to_s, nil]
534
+ # @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
535
+ # @return [Integer]
536
+ def self.recv(self_p, picture, *args)
537
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
538
+ result = ::CZMQ::FFI.zsock_recv(self_p, picture, *args)
539
+ result
540
+ end
541
+
542
+ # Receive a 'picture' message from the socket (or actor). This is a
543
+ # va_list version of zsock_recv (), so please consult its documentation
544
+ # for the details.
545
+ #
546
+ # @param picture [String, #to_s, nil]
547
+ # @param argptr [::FFI::Pointer, #to_ptr]
548
+ # @return [Integer]
549
+ def vrecv(picture, argptr)
550
+ raise DestroyedError unless @ptr
551
+ self_p = @ptr
552
+ result = ::CZMQ::FFI.zsock_vrecv(self_p, picture, argptr)
553
+ result
554
+ end
555
+
556
+ # Receive a 'picture' message from the socket (or actor). This is a
557
+ # va_list version of zsock_recv (), so please consult its documentation
558
+ # for the details.
559
+ #
560
+ # This is the polymorphic version of #vrecv.
561
+ #
562
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
563
+ # object reference to use this method on
564
+ # @param picture [String, #to_s, nil]
565
+ # @param argptr [::FFI::Pointer, #to_ptr]
566
+ # @return [Integer]
567
+ def self.vrecv(self_p, picture, argptr)
568
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
569
+ result = ::CZMQ::FFI.zsock_vrecv(self_p, picture, argptr)
570
+ result
571
+ end
572
+
573
+ # Send a binary encoded 'picture' message to the socket (or actor). This
574
+ # method is similar to zsock_send, except the arguments are encoded in a
575
+ # binary format that is compatible with zproto, and is designed to reduce
576
+ # memory allocations. The pattern argument is a string that defines the
577
+ # type of each argument. Supports these argument types:
578
+ #
579
+ # pattern C type zproto type:
580
+ # 1 uint8_t type = "number" size = "1"
581
+ # 2 uint16_t type = "number" size = "2"
582
+ # 4 uint32_t type = "number" size = "3"
583
+ # 8 uint64_t type = "number" size = "4"
584
+ # s char *, 0-255 chars type = "string"
585
+ # S char *, 0-2^32-1 chars type = "longstr"
586
+ # c zchunk_t * type = "chunk"
587
+ # f zframe_t * type = "frame"
588
+ # u zuuid_t * type = "uuid"
589
+ # m zmsg_t * type = "msg"
590
+ # p void *, sends pointer value, only over inproc
591
+ #
592
+ # Does not change or take ownership of any arguments. Returns 0 if
593
+ # successful, -1 if sending failed for any reason.
594
+ #
595
+ # @param picture [String, #to_s, nil]
596
+ # @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
597
+ # @return [Integer]
598
+ def bsend(picture, *args)
599
+ raise DestroyedError unless @ptr
600
+ self_p = @ptr
601
+ result = ::CZMQ::FFI.zsock_bsend(self_p, picture, *args)
602
+ result
603
+ end
604
+
605
+ # Send a binary encoded 'picture' message to the socket (or actor). This
606
+ # method is similar to zsock_send, except the arguments are encoded in a
607
+ # binary format that is compatible with zproto, and is designed to reduce
608
+ # memory allocations. The pattern argument is a string that defines the
609
+ # type of each argument. Supports these argument types:
610
+ #
611
+ # pattern C type zproto type:
612
+ # 1 uint8_t type = "number" size = "1"
613
+ # 2 uint16_t type = "number" size = "2"
614
+ # 4 uint32_t type = "number" size = "3"
615
+ # 8 uint64_t type = "number" size = "4"
616
+ # s char *, 0-255 chars type = "string"
617
+ # S char *, 0-2^32-1 chars type = "longstr"
618
+ # c zchunk_t * type = "chunk"
619
+ # f zframe_t * type = "frame"
620
+ # u zuuid_t * type = "uuid"
621
+ # m zmsg_t * type = "msg"
622
+ # p void *, sends pointer value, only over inproc
623
+ #
624
+ # Does not change or take ownership of any arguments. Returns 0 if
625
+ # successful, -1 if sending failed for any reason.
626
+ #
627
+ # This is the polymorphic version of #bsend.
628
+ #
629
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
630
+ # object reference to use this method on
631
+ # @param picture [String, #to_s, nil]
632
+ # @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
633
+ # @return [Integer]
634
+ def self.bsend(self_p, picture, *args)
635
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
636
+ result = ::CZMQ::FFI.zsock_bsend(self_p, picture, *args)
637
+ result
638
+ end
639
+
640
+ # Receive a binary encoded 'picture' message from the socket (or actor).
641
+ # This method is similar to zsock_recv, except the arguments are encoded
642
+ # in a binary format that is compatible with zproto, and is designed to
643
+ # reduce memory allocations. The pattern argument is a string that defines
644
+ # the type of each argument. See zsock_bsend for the supported argument
645
+ # types. All arguments must be pointers; this call sets them to point to
646
+ # values held on a per-socket basis.
647
+ # Note that zsock_brecv creates the returned objects, and the caller must
648
+ # destroy them when finished with them. The supplied pointers do not need
649
+ # to be initialized. Returns 0 if successful, or -1 if it failed to read
650
+ # a message.
651
+ #
652
+ # @param picture [String, #to_s, nil]
653
+ # @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
654
+ # @return [Integer]
655
+ def brecv(picture, *args)
656
+ raise DestroyedError unless @ptr
657
+ self_p = @ptr
658
+ result = ::CZMQ::FFI.zsock_brecv(self_p, picture, *args)
659
+ result
660
+ end
661
+
662
+ # Receive a binary encoded 'picture' message from the socket (or actor).
663
+ # This method is similar to zsock_recv, except the arguments are encoded
664
+ # in a binary format that is compatible with zproto, and is designed to
665
+ # reduce memory allocations. The pattern argument is a string that defines
666
+ # the type of each argument. See zsock_bsend for the supported argument
667
+ # types. All arguments must be pointers; this call sets them to point to
668
+ # values held on a per-socket basis.
669
+ # Note that zsock_brecv creates the returned objects, and the caller must
670
+ # destroy them when finished with them. The supplied pointers do not need
671
+ # to be initialized. Returns 0 if successful, or -1 if it failed to read
672
+ # a message.
673
+ #
674
+ # This is the polymorphic version of #brecv.
675
+ #
676
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
677
+ # object reference to use this method on
678
+ # @param picture [String, #to_s, nil]
679
+ # @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs
680
+ # @return [Integer]
681
+ def self.brecv(self_p, picture, *args)
682
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
683
+ result = ::CZMQ::FFI.zsock_brecv(self_p, picture, *args)
684
+ result
685
+ end
686
+
687
+ # Return socket routing ID if any. This returns 0 if the socket is not
688
+ # of type ZMQ_SERVER or if no request was already received on it.
689
+ #
690
+ # @return [Integer]
691
+ def routing_id()
692
+ raise DestroyedError unless @ptr
693
+ self_p = @ptr
694
+ result = ::CZMQ::FFI.zsock_routing_id(self_p)
695
+ result
696
+ end
697
+
698
+ # Set routing ID on socket. The socket MUST be of type ZMQ_SERVER.
699
+ # This will be used when sending messages on the socket via the zsock API.
700
+ #
701
+ # @param routing_id [Integer, #to_int, #to_i]
702
+ # @return [void]
703
+ def set_routing_id(routing_id)
704
+ raise DestroyedError unless @ptr
705
+ self_p = @ptr
706
+ routing_id = Integer(routing_id)
707
+ result = ::CZMQ::FFI.zsock_set_routing_id(self_p, routing_id)
708
+ result
709
+ end
710
+
711
+ # Set socket to use unbounded pipes (HWM=0); use this in cases when you are
712
+ # totally certain the message volume can fit in memory. This method works
713
+ # across all versions of ZeroMQ. Takes a polymorphic socket reference.
714
+ #
715
+ # @return [void]
716
+ def set_unbounded()
717
+ raise DestroyedError unless @ptr
718
+ self_p = @ptr
719
+ result = ::CZMQ::FFI.zsock_set_unbounded(self_p)
720
+ result
721
+ end
722
+
723
+ # Set socket to use unbounded pipes (HWM=0); use this in cases when you are
724
+ # totally certain the message volume can fit in memory. This method works
725
+ # across all versions of ZeroMQ. Takes a polymorphic socket reference.
726
+ #
727
+ # This is the polymorphic version of #set_unbounded.
728
+ #
729
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
730
+ # object reference to use this method on
731
+ # @return [void]
732
+ def self.set_unbounded(self_p)
733
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
734
+ result = ::CZMQ::FFI.zsock_set_unbounded(self_p)
735
+ result
736
+ end
737
+
738
+ # Send a signal over a socket. A signal is a short message carrying a
739
+ # success/failure code (by convention, 0 means OK). Signals are encoded
740
+ # to be distinguishable from "normal" messages. Accepts a zsock_t or a
741
+ # zactor_t argument, and returns 0 if successful, -1 if the signal could
742
+ # not be sent. Takes a polymorphic socket reference.
743
+ #
744
+ # @param status [Integer, #to_int, #to_i]
745
+ # @return [Integer]
746
+ def signal(status)
747
+ raise DestroyedError unless @ptr
748
+ self_p = @ptr
749
+ status = Integer(status)
750
+ result = ::CZMQ::FFI.zsock_signal(self_p, status)
751
+ result
752
+ end
753
+
754
+ # Send a signal over a socket. A signal is a short message carrying a
755
+ # success/failure code (by convention, 0 means OK). Signals are encoded
756
+ # to be distinguishable from "normal" messages. Accepts a zsock_t or a
757
+ # zactor_t argument, and returns 0 if successful, -1 if the signal could
758
+ # not be sent. Takes a polymorphic socket reference.
759
+ #
760
+ # This is the polymorphic version of #signal.
761
+ #
762
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
763
+ # object reference to use this method on
764
+ # @param status [Integer, #to_int, #to_i]
765
+ # @return [Integer]
766
+ def self.signal(self_p, status)
767
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
768
+ status = Integer(status)
769
+ result = ::CZMQ::FFI.zsock_signal(self_p, status)
770
+ result
771
+ end
772
+
773
+ # Wait on a signal. Use this to coordinate between threads, over pipe
774
+ # pairs. Blocks until the signal is received. Returns -1 on error, 0 or
775
+ # greater on success. Accepts a zsock_t or a zactor_t as argument.
776
+ # Takes a polymorphic socket reference.
777
+ #
778
+ # @return [Integer]
779
+ def wait()
780
+ raise DestroyedError unless @ptr
781
+ self_p = @ptr
782
+ result = ::CZMQ::FFI.zsock_wait(self_p)
783
+ result
784
+ end
785
+
786
+ # Wait on a signal. Use this to coordinate between threads, over pipe
787
+ # pairs. Blocks until the signal is received. Returns -1 on error, 0 or
788
+ # greater on success. Accepts a zsock_t or a zactor_t as argument.
789
+ # Takes a polymorphic socket reference.
790
+ #
791
+ # This is the polymorphic version of #wait.
792
+ #
793
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
794
+ # object reference to use this method on
795
+ # @return [Integer]
796
+ def self.wait(self_p)
797
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
798
+ result = ::CZMQ::FFI.zsock_wait(self_p)
799
+ result
800
+ end
801
+
802
+ # If there is a partial message still waiting on the socket, remove and
803
+ # discard it. This is useful when reading partial messages, to get specific
804
+ # message types.
805
+ #
806
+ # @return [void]
807
+ def flush()
808
+ raise DestroyedError unless @ptr
809
+ self_p = @ptr
810
+ result = ::CZMQ::FFI.zsock_flush(self_p)
811
+ result
812
+ end
813
+
814
+ # If there is a partial message still waiting on the socket, remove and
815
+ # discard it. This is useful when reading partial messages, to get specific
816
+ # message types.
817
+ #
818
+ # This is the polymorphic version of #flush.
819
+ #
820
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
821
+ # object reference to use this method on
822
+ # @return [void]
823
+ def self.flush(self_p)
824
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
825
+ result = ::CZMQ::FFI.zsock_flush(self_p)
826
+ result
827
+ end
828
+
829
+ # Join a group for the RADIO-DISH pattern. Call only on ZMQ_DISH.
830
+ # Returns 0 if OK, -1 if failed.
831
+ #
832
+ # @param group [String, #to_s, nil]
833
+ # @return [Integer]
834
+ def join(group)
835
+ raise DestroyedError unless @ptr
836
+ self_p = @ptr
837
+ result = ::CZMQ::FFI.zsock_join(self_p, group)
838
+ result
839
+ end
840
+
841
+ # Join a group for the RADIO-DISH pattern. Call only on ZMQ_DISH.
842
+ # Returns 0 if OK, -1 if failed.
843
+ #
844
+ # This is the polymorphic version of #join.
845
+ #
846
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
847
+ # object reference to use this method on
848
+ # @param group [String, #to_s, nil]
849
+ # @return [Integer]
850
+ def self.join(self_p, group)
851
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
852
+ result = ::CZMQ::FFI.zsock_join(self_p, group)
853
+ result
854
+ end
855
+
856
+ # Leave a group for the RADIO-DISH pattern. Call only on ZMQ_DISH.
857
+ # Returns 0 if OK, -1 if failed.
858
+ #
859
+ # @param group [String, #to_s, nil]
860
+ # @return [Integer]
861
+ def leave(group)
862
+ raise DestroyedError unless @ptr
863
+ self_p = @ptr
864
+ result = ::CZMQ::FFI.zsock_leave(self_p, group)
865
+ result
866
+ end
867
+
868
+ # Leave a group for the RADIO-DISH pattern. Call only on ZMQ_DISH.
869
+ # Returns 0 if OK, -1 if failed.
870
+ #
871
+ # This is the polymorphic version of #leave.
872
+ #
873
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
874
+ # object reference to use this method on
875
+ # @param group [String, #to_s, nil]
876
+ # @return [Integer]
877
+ def self.leave(self_p, group)
878
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
879
+ result = ::CZMQ::FFI.zsock_leave(self_p, group)
880
+ result
881
+ end
882
+
883
+ # Probe the supplied object, and report if it looks like a zsock_t.
884
+ # Takes a polymorphic socket reference.
885
+ #
886
+ # @param self_ [::FFI::Pointer, #to_ptr]
887
+ # @return [Boolean]
888
+ def self.is(self_)
889
+ result = ::CZMQ::FFI.zsock_is(self_)
890
+ result
891
+ end
892
+
893
+ # Probe the supplied reference. If it looks like a zsock_t instance, return
894
+ # the underlying libzmq socket handle; else if it looks like a file
895
+ # descriptor, return NULL; else if it looks like a libzmq socket handle,
896
+ # return the supplied value. Takes a polymorphic socket reference.
897
+ #
898
+ # @param self_ [::FFI::Pointer, #to_ptr]
899
+ # @return [::FFI::Pointer]
900
+ def self.resolve(self_)
901
+ result = ::CZMQ::FFI.zsock_resolve(self_)
902
+ result
903
+ end
904
+
905
+ # Get socket option `heartbeat_ivl`.
906
+ #
907
+ # @return [Integer]
908
+ def heartbeat_ivl()
909
+ raise DestroyedError unless @ptr
910
+ self_p = @ptr
911
+ result = ::CZMQ::FFI.zsock_heartbeat_ivl(self_p)
912
+ result
913
+ end
914
+
915
+ # Get socket option `heartbeat_ivl`.
916
+ #
917
+ # This is the polymorphic version of #heartbeat_ivl.
918
+ #
919
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
920
+ # object reference to use this method on
921
+ # @return [Integer]
922
+ def self.heartbeat_ivl(self_p)
923
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
924
+ result = ::CZMQ::FFI.zsock_heartbeat_ivl(self_p)
925
+ result
926
+ end
927
+
928
+ # Set socket option `heartbeat_ivl`.
929
+ #
930
+ # @param heartbeat_ivl [Integer, #to_int, #to_i]
931
+ # @return [void]
932
+ def set_heartbeat_ivl(heartbeat_ivl)
933
+ raise DestroyedError unless @ptr
934
+ self_p = @ptr
935
+ heartbeat_ivl = Integer(heartbeat_ivl)
936
+ result = ::CZMQ::FFI.zsock_set_heartbeat_ivl(self_p, heartbeat_ivl)
937
+ result
938
+ end
939
+
940
+ # Set socket option `heartbeat_ivl`.
941
+ #
942
+ # This is the polymorphic version of #set_heartbeat_ivl.
943
+ #
944
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
945
+ # object reference to use this method on
946
+ # @param heartbeat_ivl [Integer, #to_int, #to_i]
947
+ # @return [void]
948
+ def self.set_heartbeat_ivl(self_p, heartbeat_ivl)
949
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
950
+ heartbeat_ivl = Integer(heartbeat_ivl)
951
+ result = ::CZMQ::FFI.zsock_set_heartbeat_ivl(self_p, heartbeat_ivl)
952
+ result
953
+ end
954
+
955
+ # Get socket option `heartbeat_ttl`.
956
+ #
957
+ # @return [Integer]
958
+ def heartbeat_ttl()
959
+ raise DestroyedError unless @ptr
960
+ self_p = @ptr
961
+ result = ::CZMQ::FFI.zsock_heartbeat_ttl(self_p)
962
+ result
963
+ end
964
+
965
+ # Get socket option `heartbeat_ttl`.
966
+ #
967
+ # This is the polymorphic version of #heartbeat_ttl.
968
+ #
969
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
970
+ # object reference to use this method on
971
+ # @return [Integer]
972
+ def self.heartbeat_ttl(self_p)
973
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
974
+ result = ::CZMQ::FFI.zsock_heartbeat_ttl(self_p)
975
+ result
976
+ end
977
+
978
+ # Set socket option `heartbeat_ttl`.
979
+ #
980
+ # @param heartbeat_ttl [Integer, #to_int, #to_i]
981
+ # @return [void]
982
+ def set_heartbeat_ttl(heartbeat_ttl)
983
+ raise DestroyedError unless @ptr
984
+ self_p = @ptr
985
+ heartbeat_ttl = Integer(heartbeat_ttl)
986
+ result = ::CZMQ::FFI.zsock_set_heartbeat_ttl(self_p, heartbeat_ttl)
987
+ result
988
+ end
989
+
990
+ # Set socket option `heartbeat_ttl`.
991
+ #
992
+ # This is the polymorphic version of #set_heartbeat_ttl.
993
+ #
994
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
995
+ # object reference to use this method on
996
+ # @param heartbeat_ttl [Integer, #to_int, #to_i]
997
+ # @return [void]
998
+ def self.set_heartbeat_ttl(self_p, heartbeat_ttl)
999
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1000
+ heartbeat_ttl = Integer(heartbeat_ttl)
1001
+ result = ::CZMQ::FFI.zsock_set_heartbeat_ttl(self_p, heartbeat_ttl)
1002
+ result
1003
+ end
1004
+
1005
+ # Get socket option `heartbeat_timeout`.
1006
+ #
1007
+ # @return [Integer]
1008
+ def heartbeat_timeout()
1009
+ raise DestroyedError unless @ptr
1010
+ self_p = @ptr
1011
+ result = ::CZMQ::FFI.zsock_heartbeat_timeout(self_p)
1012
+ result
1013
+ end
1014
+
1015
+ # Get socket option `heartbeat_timeout`.
1016
+ #
1017
+ # This is the polymorphic version of #heartbeat_timeout.
1018
+ #
1019
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1020
+ # object reference to use this method on
1021
+ # @return [Integer]
1022
+ def self.heartbeat_timeout(self_p)
1023
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1024
+ result = ::CZMQ::FFI.zsock_heartbeat_timeout(self_p)
1025
+ result
1026
+ end
1027
+
1028
+ # Set socket option `heartbeat_timeout`.
1029
+ #
1030
+ # @param heartbeat_timeout [Integer, #to_int, #to_i]
1031
+ # @return [void]
1032
+ def set_heartbeat_timeout(heartbeat_timeout)
1033
+ raise DestroyedError unless @ptr
1034
+ self_p = @ptr
1035
+ heartbeat_timeout = Integer(heartbeat_timeout)
1036
+ result = ::CZMQ::FFI.zsock_set_heartbeat_timeout(self_p, heartbeat_timeout)
1037
+ result
1038
+ end
1039
+
1040
+ # Set socket option `heartbeat_timeout`.
1041
+ #
1042
+ # This is the polymorphic version of #set_heartbeat_timeout.
1043
+ #
1044
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1045
+ # object reference to use this method on
1046
+ # @param heartbeat_timeout [Integer, #to_int, #to_i]
1047
+ # @return [void]
1048
+ def self.set_heartbeat_timeout(self_p, heartbeat_timeout)
1049
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1050
+ heartbeat_timeout = Integer(heartbeat_timeout)
1051
+ result = ::CZMQ::FFI.zsock_set_heartbeat_timeout(self_p, heartbeat_timeout)
1052
+ result
1053
+ end
1054
+
1055
+ # Get socket option `use_fd`.
1056
+ #
1057
+ # @return [Integer]
1058
+ def use_fd()
1059
+ raise DestroyedError unless @ptr
1060
+ self_p = @ptr
1061
+ result = ::CZMQ::FFI.zsock_use_fd(self_p)
1062
+ result
1063
+ end
1064
+
1065
+ # Get socket option `use_fd`.
1066
+ #
1067
+ # This is the polymorphic version of #use_fd.
1068
+ #
1069
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1070
+ # object reference to use this method on
1071
+ # @return [Integer]
1072
+ def self.use_fd(self_p)
1073
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1074
+ result = ::CZMQ::FFI.zsock_use_fd(self_p)
1075
+ result
1076
+ end
1077
+
1078
+ # Set socket option `use_fd`.
1079
+ #
1080
+ # @param use_fd [Integer, #to_int, #to_i]
1081
+ # @return [void]
1082
+ def set_use_fd(use_fd)
1083
+ raise DestroyedError unless @ptr
1084
+ self_p = @ptr
1085
+ use_fd = Integer(use_fd)
1086
+ result = ::CZMQ::FFI.zsock_set_use_fd(self_p, use_fd)
1087
+ result
1088
+ end
1089
+
1090
+ # Set socket option `use_fd`.
1091
+ #
1092
+ # This is the polymorphic version of #set_use_fd.
1093
+ #
1094
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1095
+ # object reference to use this method on
1096
+ # @param use_fd [Integer, #to_int, #to_i]
1097
+ # @return [void]
1098
+ def self.set_use_fd(self_p, use_fd)
1099
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1100
+ use_fd = Integer(use_fd)
1101
+ result = ::CZMQ::FFI.zsock_set_use_fd(self_p, use_fd)
1102
+ result
1103
+ end
1104
+
1105
+ # Get socket option `tos`.
1106
+ #
1107
+ # @return [Integer]
1108
+ def tos()
1109
+ raise DestroyedError unless @ptr
1110
+ self_p = @ptr
1111
+ result = ::CZMQ::FFI.zsock_tos(self_p)
1112
+ result
1113
+ end
1114
+
1115
+ # Get socket option `tos`.
1116
+ #
1117
+ # This is the polymorphic version of #tos.
1118
+ #
1119
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1120
+ # object reference to use this method on
1121
+ # @return [Integer]
1122
+ def self.tos(self_p)
1123
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1124
+ result = ::CZMQ::FFI.zsock_tos(self_p)
1125
+ result
1126
+ end
1127
+
1128
+ # Set socket option `tos`.
1129
+ #
1130
+ # @param tos [Integer, #to_int, #to_i]
1131
+ # @return [void]
1132
+ def set_tos(tos)
1133
+ raise DestroyedError unless @ptr
1134
+ self_p = @ptr
1135
+ tos = Integer(tos)
1136
+ result = ::CZMQ::FFI.zsock_set_tos(self_p, tos)
1137
+ result
1138
+ end
1139
+
1140
+ # Set socket option `tos`.
1141
+ #
1142
+ # This is the polymorphic version of #set_tos.
1143
+ #
1144
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1145
+ # object reference to use this method on
1146
+ # @param tos [Integer, #to_int, #to_i]
1147
+ # @return [void]
1148
+ def self.set_tos(self_p, tos)
1149
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1150
+ tos = Integer(tos)
1151
+ result = ::CZMQ::FFI.zsock_set_tos(self_p, tos)
1152
+ result
1153
+ end
1154
+
1155
+ # Set socket option `router_handover`.
1156
+ #
1157
+ # @param router_handover [Integer, #to_int, #to_i]
1158
+ # @return [void]
1159
+ def set_router_handover(router_handover)
1160
+ raise DestroyedError unless @ptr
1161
+ self_p = @ptr
1162
+ router_handover = Integer(router_handover)
1163
+ result = ::CZMQ::FFI.zsock_set_router_handover(self_p, router_handover)
1164
+ result
1165
+ end
1166
+
1167
+ # Set socket option `router_handover`.
1168
+ #
1169
+ # This is the polymorphic version of #set_router_handover.
1170
+ #
1171
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1172
+ # object reference to use this method on
1173
+ # @param router_handover [Integer, #to_int, #to_i]
1174
+ # @return [void]
1175
+ def self.set_router_handover(self_p, router_handover)
1176
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1177
+ router_handover = Integer(router_handover)
1178
+ result = ::CZMQ::FFI.zsock_set_router_handover(self_p, router_handover)
1179
+ result
1180
+ end
1181
+
1182
+ # Set socket option `router_mandatory`.
1183
+ #
1184
+ # @param router_mandatory [Integer, #to_int, #to_i]
1185
+ # @return [void]
1186
+ def set_router_mandatory(router_mandatory)
1187
+ raise DestroyedError unless @ptr
1188
+ self_p = @ptr
1189
+ router_mandatory = Integer(router_mandatory)
1190
+ result = ::CZMQ::FFI.zsock_set_router_mandatory(self_p, router_mandatory)
1191
+ result
1192
+ end
1193
+
1194
+ # Set socket option `router_mandatory`.
1195
+ #
1196
+ # This is the polymorphic version of #set_router_mandatory.
1197
+ #
1198
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1199
+ # object reference to use this method on
1200
+ # @param router_mandatory [Integer, #to_int, #to_i]
1201
+ # @return [void]
1202
+ def self.set_router_mandatory(self_p, router_mandatory)
1203
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1204
+ router_mandatory = Integer(router_mandatory)
1205
+ result = ::CZMQ::FFI.zsock_set_router_mandatory(self_p, router_mandatory)
1206
+ result
1207
+ end
1208
+
1209
+ # Set socket option `probe_router`.
1210
+ #
1211
+ # @param probe_router [Integer, #to_int, #to_i]
1212
+ # @return [void]
1213
+ def set_probe_router(probe_router)
1214
+ raise DestroyedError unless @ptr
1215
+ self_p = @ptr
1216
+ probe_router = Integer(probe_router)
1217
+ result = ::CZMQ::FFI.zsock_set_probe_router(self_p, probe_router)
1218
+ result
1219
+ end
1220
+
1221
+ # Set socket option `probe_router`.
1222
+ #
1223
+ # This is the polymorphic version of #set_probe_router.
1224
+ #
1225
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1226
+ # object reference to use this method on
1227
+ # @param probe_router [Integer, #to_int, #to_i]
1228
+ # @return [void]
1229
+ def self.set_probe_router(self_p, probe_router)
1230
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1231
+ probe_router = Integer(probe_router)
1232
+ result = ::CZMQ::FFI.zsock_set_probe_router(self_p, probe_router)
1233
+ result
1234
+ end
1235
+
1236
+ # Set socket option `req_relaxed`.
1237
+ #
1238
+ # @param req_relaxed [Integer, #to_int, #to_i]
1239
+ # @return [void]
1240
+ def set_req_relaxed(req_relaxed)
1241
+ raise DestroyedError unless @ptr
1242
+ self_p = @ptr
1243
+ req_relaxed = Integer(req_relaxed)
1244
+ result = ::CZMQ::FFI.zsock_set_req_relaxed(self_p, req_relaxed)
1245
+ result
1246
+ end
1247
+
1248
+ # Set socket option `req_relaxed`.
1249
+ #
1250
+ # This is the polymorphic version of #set_req_relaxed.
1251
+ #
1252
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1253
+ # object reference to use this method on
1254
+ # @param req_relaxed [Integer, #to_int, #to_i]
1255
+ # @return [void]
1256
+ def self.set_req_relaxed(self_p, req_relaxed)
1257
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1258
+ req_relaxed = Integer(req_relaxed)
1259
+ result = ::CZMQ::FFI.zsock_set_req_relaxed(self_p, req_relaxed)
1260
+ result
1261
+ end
1262
+
1263
+ # Set socket option `req_correlate`.
1264
+ #
1265
+ # @param req_correlate [Integer, #to_int, #to_i]
1266
+ # @return [void]
1267
+ def set_req_correlate(req_correlate)
1268
+ raise DestroyedError unless @ptr
1269
+ self_p = @ptr
1270
+ req_correlate = Integer(req_correlate)
1271
+ result = ::CZMQ::FFI.zsock_set_req_correlate(self_p, req_correlate)
1272
+ result
1273
+ end
1274
+
1275
+ # Set socket option `req_correlate`.
1276
+ #
1277
+ # This is the polymorphic version of #set_req_correlate.
1278
+ #
1279
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1280
+ # object reference to use this method on
1281
+ # @param req_correlate [Integer, #to_int, #to_i]
1282
+ # @return [void]
1283
+ def self.set_req_correlate(self_p, req_correlate)
1284
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1285
+ req_correlate = Integer(req_correlate)
1286
+ result = ::CZMQ::FFI.zsock_set_req_correlate(self_p, req_correlate)
1287
+ result
1288
+ end
1289
+
1290
+ # Set socket option `conflate`.
1291
+ #
1292
+ # @param conflate [Integer, #to_int, #to_i]
1293
+ # @return [void]
1294
+ def set_conflate(conflate)
1295
+ raise DestroyedError unless @ptr
1296
+ self_p = @ptr
1297
+ conflate = Integer(conflate)
1298
+ result = ::CZMQ::FFI.zsock_set_conflate(self_p, conflate)
1299
+ result
1300
+ end
1301
+
1302
+ # Set socket option `conflate`.
1303
+ #
1304
+ # This is the polymorphic version of #set_conflate.
1305
+ #
1306
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1307
+ # object reference to use this method on
1308
+ # @param conflate [Integer, #to_int, #to_i]
1309
+ # @return [void]
1310
+ def self.set_conflate(self_p, conflate)
1311
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1312
+ conflate = Integer(conflate)
1313
+ result = ::CZMQ::FFI.zsock_set_conflate(self_p, conflate)
1314
+ result
1315
+ end
1316
+
1317
+ # Get socket option `zap_domain`.
1318
+ #
1319
+ # @return [::FFI::AutoPointer]
1320
+ def zap_domain()
1321
+ raise DestroyedError unless @ptr
1322
+ self_p = @ptr
1323
+ result = ::CZMQ::FFI.zsock_zap_domain(self_p)
1324
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1325
+ result
1326
+ end
1327
+
1328
+ # Get socket option `zap_domain`.
1329
+ #
1330
+ # This is the polymorphic version of #zap_domain.
1331
+ #
1332
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1333
+ # object reference to use this method on
1334
+ # @return [::FFI::AutoPointer]
1335
+ def self.zap_domain(self_p)
1336
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1337
+ result = ::CZMQ::FFI.zsock_zap_domain(self_p)
1338
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1339
+ result
1340
+ end
1341
+
1342
+ # Set socket option `zap_domain`.
1343
+ #
1344
+ # @param zap_domain [String, #to_s, nil]
1345
+ # @return [void]
1346
+ def set_zap_domain(zap_domain)
1347
+ raise DestroyedError unless @ptr
1348
+ self_p = @ptr
1349
+ result = ::CZMQ::FFI.zsock_set_zap_domain(self_p, zap_domain)
1350
+ result
1351
+ end
1352
+
1353
+ # Set socket option `zap_domain`.
1354
+ #
1355
+ # This is the polymorphic version of #set_zap_domain.
1356
+ #
1357
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1358
+ # object reference to use this method on
1359
+ # @param zap_domain [String, #to_s, nil]
1360
+ # @return [void]
1361
+ def self.set_zap_domain(self_p, zap_domain)
1362
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1363
+ result = ::CZMQ::FFI.zsock_set_zap_domain(self_p, zap_domain)
1364
+ result
1365
+ end
1366
+
1367
+ # Get socket option `mechanism`.
1368
+ #
1369
+ # @return [Integer]
1370
+ def mechanism()
1371
+ raise DestroyedError unless @ptr
1372
+ self_p = @ptr
1373
+ result = ::CZMQ::FFI.zsock_mechanism(self_p)
1374
+ result
1375
+ end
1376
+
1377
+ # Get socket option `mechanism`.
1378
+ #
1379
+ # This is the polymorphic version of #mechanism.
1380
+ #
1381
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1382
+ # object reference to use this method on
1383
+ # @return [Integer]
1384
+ def self.mechanism(self_p)
1385
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1386
+ result = ::CZMQ::FFI.zsock_mechanism(self_p)
1387
+ result
1388
+ end
1389
+
1390
+ # Get socket option `plain_server`.
1391
+ #
1392
+ # @return [Integer]
1393
+ def plain_server()
1394
+ raise DestroyedError unless @ptr
1395
+ self_p = @ptr
1396
+ result = ::CZMQ::FFI.zsock_plain_server(self_p)
1397
+ result
1398
+ end
1399
+
1400
+ # Get socket option `plain_server`.
1401
+ #
1402
+ # This is the polymorphic version of #plain_server.
1403
+ #
1404
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1405
+ # object reference to use this method on
1406
+ # @return [Integer]
1407
+ def self.plain_server(self_p)
1408
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1409
+ result = ::CZMQ::FFI.zsock_plain_server(self_p)
1410
+ result
1411
+ end
1412
+
1413
+ # Set socket option `plain_server`.
1414
+ #
1415
+ # @param plain_server [Integer, #to_int, #to_i]
1416
+ # @return [void]
1417
+ def set_plain_server(plain_server)
1418
+ raise DestroyedError unless @ptr
1419
+ self_p = @ptr
1420
+ plain_server = Integer(plain_server)
1421
+ result = ::CZMQ::FFI.zsock_set_plain_server(self_p, plain_server)
1422
+ result
1423
+ end
1424
+
1425
+ # Set socket option `plain_server`.
1426
+ #
1427
+ # This is the polymorphic version of #set_plain_server.
1428
+ #
1429
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1430
+ # object reference to use this method on
1431
+ # @param plain_server [Integer, #to_int, #to_i]
1432
+ # @return [void]
1433
+ def self.set_plain_server(self_p, plain_server)
1434
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1435
+ plain_server = Integer(plain_server)
1436
+ result = ::CZMQ::FFI.zsock_set_plain_server(self_p, plain_server)
1437
+ result
1438
+ end
1439
+
1440
+ # Get socket option `plain_username`.
1441
+ #
1442
+ # @return [::FFI::AutoPointer]
1443
+ def plain_username()
1444
+ raise DestroyedError unless @ptr
1445
+ self_p = @ptr
1446
+ result = ::CZMQ::FFI.zsock_plain_username(self_p)
1447
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1448
+ result
1449
+ end
1450
+
1451
+ # Get socket option `plain_username`.
1452
+ #
1453
+ # This is the polymorphic version of #plain_username.
1454
+ #
1455
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1456
+ # object reference to use this method on
1457
+ # @return [::FFI::AutoPointer]
1458
+ def self.plain_username(self_p)
1459
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1460
+ result = ::CZMQ::FFI.zsock_plain_username(self_p)
1461
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1462
+ result
1463
+ end
1464
+
1465
+ # Set socket option `plain_username`.
1466
+ #
1467
+ # @param plain_username [String, #to_s, nil]
1468
+ # @return [void]
1469
+ def set_plain_username(plain_username)
1470
+ raise DestroyedError unless @ptr
1471
+ self_p = @ptr
1472
+ result = ::CZMQ::FFI.zsock_set_plain_username(self_p, plain_username)
1473
+ result
1474
+ end
1475
+
1476
+ # Set socket option `plain_username`.
1477
+ #
1478
+ # This is the polymorphic version of #set_plain_username.
1479
+ #
1480
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1481
+ # object reference to use this method on
1482
+ # @param plain_username [String, #to_s, nil]
1483
+ # @return [void]
1484
+ def self.set_plain_username(self_p, plain_username)
1485
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1486
+ result = ::CZMQ::FFI.zsock_set_plain_username(self_p, plain_username)
1487
+ result
1488
+ end
1489
+
1490
+ # Get socket option `plain_password`.
1491
+ #
1492
+ # @return [::FFI::AutoPointer]
1493
+ def plain_password()
1494
+ raise DestroyedError unless @ptr
1495
+ self_p = @ptr
1496
+ result = ::CZMQ::FFI.zsock_plain_password(self_p)
1497
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1498
+ result
1499
+ end
1500
+
1501
+ # Get socket option `plain_password`.
1502
+ #
1503
+ # This is the polymorphic version of #plain_password.
1504
+ #
1505
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1506
+ # object reference to use this method on
1507
+ # @return [::FFI::AutoPointer]
1508
+ def self.plain_password(self_p)
1509
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1510
+ result = ::CZMQ::FFI.zsock_plain_password(self_p)
1511
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1512
+ result
1513
+ end
1514
+
1515
+ # Set socket option `plain_password`.
1516
+ #
1517
+ # @param plain_password [String, #to_s, nil]
1518
+ # @return [void]
1519
+ def set_plain_password(plain_password)
1520
+ raise DestroyedError unless @ptr
1521
+ self_p = @ptr
1522
+ result = ::CZMQ::FFI.zsock_set_plain_password(self_p, plain_password)
1523
+ result
1524
+ end
1525
+
1526
+ # Set socket option `plain_password`.
1527
+ #
1528
+ # This is the polymorphic version of #set_plain_password.
1529
+ #
1530
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1531
+ # object reference to use this method on
1532
+ # @param plain_password [String, #to_s, nil]
1533
+ # @return [void]
1534
+ def self.set_plain_password(self_p, plain_password)
1535
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1536
+ result = ::CZMQ::FFI.zsock_set_plain_password(self_p, plain_password)
1537
+ result
1538
+ end
1539
+
1540
+ # Get socket option `curve_server`.
1541
+ #
1542
+ # @return [Integer]
1543
+ def curve_server()
1544
+ raise DestroyedError unless @ptr
1545
+ self_p = @ptr
1546
+ result = ::CZMQ::FFI.zsock_curve_server(self_p)
1547
+ result
1548
+ end
1549
+
1550
+ # Get socket option `curve_server`.
1551
+ #
1552
+ # This is the polymorphic version of #curve_server.
1553
+ #
1554
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1555
+ # object reference to use this method on
1556
+ # @return [Integer]
1557
+ def self.curve_server(self_p)
1558
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1559
+ result = ::CZMQ::FFI.zsock_curve_server(self_p)
1560
+ result
1561
+ end
1562
+
1563
+ # Set socket option `curve_server`.
1564
+ #
1565
+ # @param curve_server [Integer, #to_int, #to_i]
1566
+ # @return [void]
1567
+ def set_curve_server(curve_server)
1568
+ raise DestroyedError unless @ptr
1569
+ self_p = @ptr
1570
+ curve_server = Integer(curve_server)
1571
+ result = ::CZMQ::FFI.zsock_set_curve_server(self_p, curve_server)
1572
+ result
1573
+ end
1574
+
1575
+ # Set socket option `curve_server`.
1576
+ #
1577
+ # This is the polymorphic version of #set_curve_server.
1578
+ #
1579
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1580
+ # object reference to use this method on
1581
+ # @param curve_server [Integer, #to_int, #to_i]
1582
+ # @return [void]
1583
+ def self.set_curve_server(self_p, curve_server)
1584
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1585
+ curve_server = Integer(curve_server)
1586
+ result = ::CZMQ::FFI.zsock_set_curve_server(self_p, curve_server)
1587
+ result
1588
+ end
1589
+
1590
+ # Get socket option `curve_publickey`.
1591
+ #
1592
+ # @return [::FFI::AutoPointer]
1593
+ def curve_publickey()
1594
+ raise DestroyedError unless @ptr
1595
+ self_p = @ptr
1596
+ result = ::CZMQ::FFI.zsock_curve_publickey(self_p)
1597
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1598
+ result
1599
+ end
1600
+
1601
+ # Get socket option `curve_publickey`.
1602
+ #
1603
+ # This is the polymorphic version of #curve_publickey.
1604
+ #
1605
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1606
+ # object reference to use this method on
1607
+ # @return [::FFI::AutoPointer]
1608
+ def self.curve_publickey(self_p)
1609
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1610
+ result = ::CZMQ::FFI.zsock_curve_publickey(self_p)
1611
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1612
+ result
1613
+ end
1614
+
1615
+ # Set socket option `curve_publickey`.
1616
+ #
1617
+ # @param curve_publickey [String, #to_s, nil]
1618
+ # @return [void]
1619
+ def set_curve_publickey(curve_publickey)
1620
+ raise DestroyedError unless @ptr
1621
+ self_p = @ptr
1622
+ result = ::CZMQ::FFI.zsock_set_curve_publickey(self_p, curve_publickey)
1623
+ result
1624
+ end
1625
+
1626
+ # Set socket option `curve_publickey`.
1627
+ #
1628
+ # This is the polymorphic version of #set_curve_publickey.
1629
+ #
1630
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1631
+ # object reference to use this method on
1632
+ # @param curve_publickey [String, #to_s, nil]
1633
+ # @return [void]
1634
+ def self.set_curve_publickey(self_p, curve_publickey)
1635
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1636
+ result = ::CZMQ::FFI.zsock_set_curve_publickey(self_p, curve_publickey)
1637
+ result
1638
+ end
1639
+
1640
+ # Set socket option `curve_publickey` from 32-octet binary
1641
+ #
1642
+ # @param curve_publickey [::FFI::Pointer, #to_ptr]
1643
+ # @return [void]
1644
+ def set_curve_publickey_bin(curve_publickey)
1645
+ raise DestroyedError unless @ptr
1646
+ self_p = @ptr
1647
+ result = ::CZMQ::FFI.zsock_set_curve_publickey_bin(self_p, curve_publickey)
1648
+ result
1649
+ end
1650
+
1651
+ # Set socket option `curve_publickey` from 32-octet binary
1652
+ #
1653
+ # This is the polymorphic version of #set_curve_publickey_bin.
1654
+ #
1655
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1656
+ # object reference to use this method on
1657
+ # @param curve_publickey [::FFI::Pointer, #to_ptr]
1658
+ # @return [void]
1659
+ def self.set_curve_publickey_bin(self_p, curve_publickey)
1660
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1661
+ result = ::CZMQ::FFI.zsock_set_curve_publickey_bin(self_p, curve_publickey)
1662
+ result
1663
+ end
1664
+
1665
+ # Get socket option `curve_secretkey`.
1666
+ #
1667
+ # @return [::FFI::AutoPointer]
1668
+ def curve_secretkey()
1669
+ raise DestroyedError unless @ptr
1670
+ self_p = @ptr
1671
+ result = ::CZMQ::FFI.zsock_curve_secretkey(self_p)
1672
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1673
+ result
1674
+ end
1675
+
1676
+ # Get socket option `curve_secretkey`.
1677
+ #
1678
+ # This is the polymorphic version of #curve_secretkey.
1679
+ #
1680
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1681
+ # object reference to use this method on
1682
+ # @return [::FFI::AutoPointer]
1683
+ def self.curve_secretkey(self_p)
1684
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1685
+ result = ::CZMQ::FFI.zsock_curve_secretkey(self_p)
1686
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1687
+ result
1688
+ end
1689
+
1690
+ # Set socket option `curve_secretkey`.
1691
+ #
1692
+ # @param curve_secretkey [String, #to_s, nil]
1693
+ # @return [void]
1694
+ def set_curve_secretkey(curve_secretkey)
1695
+ raise DestroyedError unless @ptr
1696
+ self_p = @ptr
1697
+ result = ::CZMQ::FFI.zsock_set_curve_secretkey(self_p, curve_secretkey)
1698
+ result
1699
+ end
1700
+
1701
+ # Set socket option `curve_secretkey`.
1702
+ #
1703
+ # This is the polymorphic version of #set_curve_secretkey.
1704
+ #
1705
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1706
+ # object reference to use this method on
1707
+ # @param curve_secretkey [String, #to_s, nil]
1708
+ # @return [void]
1709
+ def self.set_curve_secretkey(self_p, curve_secretkey)
1710
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1711
+ result = ::CZMQ::FFI.zsock_set_curve_secretkey(self_p, curve_secretkey)
1712
+ result
1713
+ end
1714
+
1715
+ # Set socket option `curve_secretkey` from 32-octet binary
1716
+ #
1717
+ # @param curve_secretkey [::FFI::Pointer, #to_ptr]
1718
+ # @return [void]
1719
+ def set_curve_secretkey_bin(curve_secretkey)
1720
+ raise DestroyedError unless @ptr
1721
+ self_p = @ptr
1722
+ result = ::CZMQ::FFI.zsock_set_curve_secretkey_bin(self_p, curve_secretkey)
1723
+ result
1724
+ end
1725
+
1726
+ # Set socket option `curve_secretkey` from 32-octet binary
1727
+ #
1728
+ # This is the polymorphic version of #set_curve_secretkey_bin.
1729
+ #
1730
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1731
+ # object reference to use this method on
1732
+ # @param curve_secretkey [::FFI::Pointer, #to_ptr]
1733
+ # @return [void]
1734
+ def self.set_curve_secretkey_bin(self_p, curve_secretkey)
1735
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1736
+ result = ::CZMQ::FFI.zsock_set_curve_secretkey_bin(self_p, curve_secretkey)
1737
+ result
1738
+ end
1739
+
1740
+ # Get socket option `curve_serverkey`.
1741
+ #
1742
+ # @return [::FFI::AutoPointer]
1743
+ def curve_serverkey()
1744
+ raise DestroyedError unless @ptr
1745
+ self_p = @ptr
1746
+ result = ::CZMQ::FFI.zsock_curve_serverkey(self_p)
1747
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1748
+ result
1749
+ end
1750
+
1751
+ # Get socket option `curve_serverkey`.
1752
+ #
1753
+ # This is the polymorphic version of #curve_serverkey.
1754
+ #
1755
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1756
+ # object reference to use this method on
1757
+ # @return [::FFI::AutoPointer]
1758
+ def self.curve_serverkey(self_p)
1759
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1760
+ result = ::CZMQ::FFI.zsock_curve_serverkey(self_p)
1761
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1762
+ result
1763
+ end
1764
+
1765
+ # Set socket option `curve_serverkey`.
1766
+ #
1767
+ # @param curve_serverkey [String, #to_s, nil]
1768
+ # @return [void]
1769
+ def set_curve_serverkey(curve_serverkey)
1770
+ raise DestroyedError unless @ptr
1771
+ self_p = @ptr
1772
+ result = ::CZMQ::FFI.zsock_set_curve_serverkey(self_p, curve_serverkey)
1773
+ result
1774
+ end
1775
+
1776
+ # Set socket option `curve_serverkey`.
1777
+ #
1778
+ # This is the polymorphic version of #set_curve_serverkey.
1779
+ #
1780
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1781
+ # object reference to use this method on
1782
+ # @param curve_serverkey [String, #to_s, nil]
1783
+ # @return [void]
1784
+ def self.set_curve_serverkey(self_p, curve_serverkey)
1785
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1786
+ result = ::CZMQ::FFI.zsock_set_curve_serverkey(self_p, curve_serverkey)
1787
+ result
1788
+ end
1789
+
1790
+ # Set socket option `curve_serverkey` from 32-octet binary
1791
+ #
1792
+ # @param curve_serverkey [::FFI::Pointer, #to_ptr]
1793
+ # @return [void]
1794
+ def set_curve_serverkey_bin(curve_serverkey)
1795
+ raise DestroyedError unless @ptr
1796
+ self_p = @ptr
1797
+ result = ::CZMQ::FFI.zsock_set_curve_serverkey_bin(self_p, curve_serverkey)
1798
+ result
1799
+ end
1800
+
1801
+ # Set socket option `curve_serverkey` from 32-octet binary
1802
+ #
1803
+ # This is the polymorphic version of #set_curve_serverkey_bin.
1804
+ #
1805
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1806
+ # object reference to use this method on
1807
+ # @param curve_serverkey [::FFI::Pointer, #to_ptr]
1808
+ # @return [void]
1809
+ def self.set_curve_serverkey_bin(self_p, curve_serverkey)
1810
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1811
+ result = ::CZMQ::FFI.zsock_set_curve_serverkey_bin(self_p, curve_serverkey)
1812
+ result
1813
+ end
1814
+
1815
+ # Get socket option `gssapi_server`.
1816
+ #
1817
+ # @return [Integer]
1818
+ def gssapi_server()
1819
+ raise DestroyedError unless @ptr
1820
+ self_p = @ptr
1821
+ result = ::CZMQ::FFI.zsock_gssapi_server(self_p)
1822
+ result
1823
+ end
1824
+
1825
+ # Get socket option `gssapi_server`.
1826
+ #
1827
+ # This is the polymorphic version of #gssapi_server.
1828
+ #
1829
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1830
+ # object reference to use this method on
1831
+ # @return [Integer]
1832
+ def self.gssapi_server(self_p)
1833
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1834
+ result = ::CZMQ::FFI.zsock_gssapi_server(self_p)
1835
+ result
1836
+ end
1837
+
1838
+ # Set socket option `gssapi_server`.
1839
+ #
1840
+ # @param gssapi_server [Integer, #to_int, #to_i]
1841
+ # @return [void]
1842
+ def set_gssapi_server(gssapi_server)
1843
+ raise DestroyedError unless @ptr
1844
+ self_p = @ptr
1845
+ gssapi_server = Integer(gssapi_server)
1846
+ result = ::CZMQ::FFI.zsock_set_gssapi_server(self_p, gssapi_server)
1847
+ result
1848
+ end
1849
+
1850
+ # Set socket option `gssapi_server`.
1851
+ #
1852
+ # This is the polymorphic version of #set_gssapi_server.
1853
+ #
1854
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1855
+ # object reference to use this method on
1856
+ # @param gssapi_server [Integer, #to_int, #to_i]
1857
+ # @return [void]
1858
+ def self.set_gssapi_server(self_p, gssapi_server)
1859
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1860
+ gssapi_server = Integer(gssapi_server)
1861
+ result = ::CZMQ::FFI.zsock_set_gssapi_server(self_p, gssapi_server)
1862
+ result
1863
+ end
1864
+
1865
+ # Get socket option `gssapi_plaintext`.
1866
+ #
1867
+ # @return [Integer]
1868
+ def gssapi_plaintext()
1869
+ raise DestroyedError unless @ptr
1870
+ self_p = @ptr
1871
+ result = ::CZMQ::FFI.zsock_gssapi_plaintext(self_p)
1872
+ result
1873
+ end
1874
+
1875
+ # Get socket option `gssapi_plaintext`.
1876
+ #
1877
+ # This is the polymorphic version of #gssapi_plaintext.
1878
+ #
1879
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1880
+ # object reference to use this method on
1881
+ # @return [Integer]
1882
+ def self.gssapi_plaintext(self_p)
1883
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1884
+ result = ::CZMQ::FFI.zsock_gssapi_plaintext(self_p)
1885
+ result
1886
+ end
1887
+
1888
+ # Set socket option `gssapi_plaintext`.
1889
+ #
1890
+ # @param gssapi_plaintext [Integer, #to_int, #to_i]
1891
+ # @return [void]
1892
+ def set_gssapi_plaintext(gssapi_plaintext)
1893
+ raise DestroyedError unless @ptr
1894
+ self_p = @ptr
1895
+ gssapi_plaintext = Integer(gssapi_plaintext)
1896
+ result = ::CZMQ::FFI.zsock_set_gssapi_plaintext(self_p, gssapi_plaintext)
1897
+ result
1898
+ end
1899
+
1900
+ # Set socket option `gssapi_plaintext`.
1901
+ #
1902
+ # This is the polymorphic version of #set_gssapi_plaintext.
1903
+ #
1904
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1905
+ # object reference to use this method on
1906
+ # @param gssapi_plaintext [Integer, #to_int, #to_i]
1907
+ # @return [void]
1908
+ def self.set_gssapi_plaintext(self_p, gssapi_plaintext)
1909
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1910
+ gssapi_plaintext = Integer(gssapi_plaintext)
1911
+ result = ::CZMQ::FFI.zsock_set_gssapi_plaintext(self_p, gssapi_plaintext)
1912
+ result
1913
+ end
1914
+
1915
+ # Get socket option `gssapi_principal`.
1916
+ #
1917
+ # @return [::FFI::AutoPointer]
1918
+ def gssapi_principal()
1919
+ raise DestroyedError unless @ptr
1920
+ self_p = @ptr
1921
+ result = ::CZMQ::FFI.zsock_gssapi_principal(self_p)
1922
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1923
+ result
1924
+ end
1925
+
1926
+ # Get socket option `gssapi_principal`.
1927
+ #
1928
+ # This is the polymorphic version of #gssapi_principal.
1929
+ #
1930
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1931
+ # object reference to use this method on
1932
+ # @return [::FFI::AutoPointer]
1933
+ def self.gssapi_principal(self_p)
1934
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1935
+ result = ::CZMQ::FFI.zsock_gssapi_principal(self_p)
1936
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1937
+ result
1938
+ end
1939
+
1940
+ # Set socket option `gssapi_principal`.
1941
+ #
1942
+ # @param gssapi_principal [String, #to_s, nil]
1943
+ # @return [void]
1944
+ def set_gssapi_principal(gssapi_principal)
1945
+ raise DestroyedError unless @ptr
1946
+ self_p = @ptr
1947
+ result = ::CZMQ::FFI.zsock_set_gssapi_principal(self_p, gssapi_principal)
1948
+ result
1949
+ end
1950
+
1951
+ # Set socket option `gssapi_principal`.
1952
+ #
1953
+ # This is the polymorphic version of #set_gssapi_principal.
1954
+ #
1955
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1956
+ # object reference to use this method on
1957
+ # @param gssapi_principal [String, #to_s, nil]
1958
+ # @return [void]
1959
+ def self.set_gssapi_principal(self_p, gssapi_principal)
1960
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1961
+ result = ::CZMQ::FFI.zsock_set_gssapi_principal(self_p, gssapi_principal)
1962
+ result
1963
+ end
1964
+
1965
+ # Get socket option `gssapi_service_principal`.
1966
+ #
1967
+ # @return [::FFI::AutoPointer]
1968
+ def gssapi_service_principal()
1969
+ raise DestroyedError unless @ptr
1970
+ self_p = @ptr
1971
+ result = ::CZMQ::FFI.zsock_gssapi_service_principal(self_p)
1972
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1973
+ result
1974
+ end
1975
+
1976
+ # Get socket option `gssapi_service_principal`.
1977
+ #
1978
+ # This is the polymorphic version of #gssapi_service_principal.
1979
+ #
1980
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1981
+ # object reference to use this method on
1982
+ # @return [::FFI::AutoPointer]
1983
+ def self.gssapi_service_principal(self_p)
1984
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1985
+ result = ::CZMQ::FFI.zsock_gssapi_service_principal(self_p)
1986
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1987
+ result
1988
+ end
1989
+
1990
+ # Set socket option `gssapi_service_principal`.
1991
+ #
1992
+ # @param gssapi_service_principal [String, #to_s, nil]
1993
+ # @return [void]
1994
+ def set_gssapi_service_principal(gssapi_service_principal)
1995
+ raise DestroyedError unless @ptr
1996
+ self_p = @ptr
1997
+ result = ::CZMQ::FFI.zsock_set_gssapi_service_principal(self_p, gssapi_service_principal)
1998
+ result
1999
+ end
2000
+
2001
+ # Set socket option `gssapi_service_principal`.
2002
+ #
2003
+ # This is the polymorphic version of #set_gssapi_service_principal.
2004
+ #
2005
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2006
+ # object reference to use this method on
2007
+ # @param gssapi_service_principal [String, #to_s, nil]
2008
+ # @return [void]
2009
+ def self.set_gssapi_service_principal(self_p, gssapi_service_principal)
2010
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2011
+ result = ::CZMQ::FFI.zsock_set_gssapi_service_principal(self_p, gssapi_service_principal)
2012
+ result
2013
+ end
2014
+
2015
+ # Get socket option `ipv6`.
2016
+ #
2017
+ # @return [Integer]
2018
+ def ipv6()
2019
+ raise DestroyedError unless @ptr
2020
+ self_p = @ptr
2021
+ result = ::CZMQ::FFI.zsock_ipv6(self_p)
2022
+ result
2023
+ end
2024
+
2025
+ # Get socket option `ipv6`.
2026
+ #
2027
+ # This is the polymorphic version of #ipv6.
2028
+ #
2029
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2030
+ # object reference to use this method on
2031
+ # @return [Integer]
2032
+ def self.ipv6(self_p)
2033
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2034
+ result = ::CZMQ::FFI.zsock_ipv6(self_p)
2035
+ result
2036
+ end
2037
+
2038
+ # Set socket option `ipv6`.
2039
+ #
2040
+ # @param ipv6 [Integer, #to_int, #to_i]
2041
+ # @return [void]
2042
+ def set_ipv6(ipv6)
2043
+ raise DestroyedError unless @ptr
2044
+ self_p = @ptr
2045
+ ipv6 = Integer(ipv6)
2046
+ result = ::CZMQ::FFI.zsock_set_ipv6(self_p, ipv6)
2047
+ result
2048
+ end
2049
+
2050
+ # Set socket option `ipv6`.
2051
+ #
2052
+ # This is the polymorphic version of #set_ipv6.
2053
+ #
2054
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2055
+ # object reference to use this method on
2056
+ # @param ipv6 [Integer, #to_int, #to_i]
2057
+ # @return [void]
2058
+ def self.set_ipv6(self_p, ipv6)
2059
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2060
+ ipv6 = Integer(ipv6)
2061
+ result = ::CZMQ::FFI.zsock_set_ipv6(self_p, ipv6)
2062
+ result
2063
+ end
2064
+
2065
+ # Get socket option `immediate`.
2066
+ #
2067
+ # @return [Integer]
2068
+ def immediate()
2069
+ raise DestroyedError unless @ptr
2070
+ self_p = @ptr
2071
+ result = ::CZMQ::FFI.zsock_immediate(self_p)
2072
+ result
2073
+ end
2074
+
2075
+ # Get socket option `immediate`.
2076
+ #
2077
+ # This is the polymorphic version of #immediate.
2078
+ #
2079
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2080
+ # object reference to use this method on
2081
+ # @return [Integer]
2082
+ def self.immediate(self_p)
2083
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2084
+ result = ::CZMQ::FFI.zsock_immediate(self_p)
2085
+ result
2086
+ end
2087
+
2088
+ # Set socket option `immediate`.
2089
+ #
2090
+ # @param immediate [Integer, #to_int, #to_i]
2091
+ # @return [void]
2092
+ def set_immediate(immediate)
2093
+ raise DestroyedError unless @ptr
2094
+ self_p = @ptr
2095
+ immediate = Integer(immediate)
2096
+ result = ::CZMQ::FFI.zsock_set_immediate(self_p, immediate)
2097
+ result
2098
+ end
2099
+
2100
+ # Set socket option `immediate`.
2101
+ #
2102
+ # This is the polymorphic version of #set_immediate.
2103
+ #
2104
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2105
+ # object reference to use this method on
2106
+ # @param immediate [Integer, #to_int, #to_i]
2107
+ # @return [void]
2108
+ def self.set_immediate(self_p, immediate)
2109
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2110
+ immediate = Integer(immediate)
2111
+ result = ::CZMQ::FFI.zsock_set_immediate(self_p, immediate)
2112
+ result
2113
+ end
2114
+
2115
+ # Set socket option `router_raw`.
2116
+ #
2117
+ # @param router_raw [Integer, #to_int, #to_i]
2118
+ # @return [void]
2119
+ def set_router_raw(router_raw)
2120
+ raise DestroyedError unless @ptr
2121
+ self_p = @ptr
2122
+ router_raw = Integer(router_raw)
2123
+ result = ::CZMQ::FFI.zsock_set_router_raw(self_p, router_raw)
2124
+ result
2125
+ end
2126
+
2127
+ # Set socket option `router_raw`.
2128
+ #
2129
+ # This is the polymorphic version of #set_router_raw.
2130
+ #
2131
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2132
+ # object reference to use this method on
2133
+ # @param router_raw [Integer, #to_int, #to_i]
2134
+ # @return [void]
2135
+ def self.set_router_raw(self_p, router_raw)
2136
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2137
+ router_raw = Integer(router_raw)
2138
+ result = ::CZMQ::FFI.zsock_set_router_raw(self_p, router_raw)
2139
+ result
2140
+ end
2141
+
2142
+ # Get socket option `ipv4only`.
2143
+ #
2144
+ # @return [Integer]
2145
+ def ipv4only()
2146
+ raise DestroyedError unless @ptr
2147
+ self_p = @ptr
2148
+ result = ::CZMQ::FFI.zsock_ipv4only(self_p)
2149
+ result
2150
+ end
2151
+
2152
+ # Get socket option `ipv4only`.
2153
+ #
2154
+ # This is the polymorphic version of #ipv4only.
2155
+ #
2156
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2157
+ # object reference to use this method on
2158
+ # @return [Integer]
2159
+ def self.ipv4only(self_p)
2160
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2161
+ result = ::CZMQ::FFI.zsock_ipv4only(self_p)
2162
+ result
2163
+ end
2164
+
2165
+ # Set socket option `ipv4only`.
2166
+ #
2167
+ # @param ipv4only [Integer, #to_int, #to_i]
2168
+ # @return [void]
2169
+ def set_ipv4only(ipv4only)
2170
+ raise DestroyedError unless @ptr
2171
+ self_p = @ptr
2172
+ ipv4only = Integer(ipv4only)
2173
+ result = ::CZMQ::FFI.zsock_set_ipv4only(self_p, ipv4only)
2174
+ result
2175
+ end
2176
+
2177
+ # Set socket option `ipv4only`.
2178
+ #
2179
+ # This is the polymorphic version of #set_ipv4only.
2180
+ #
2181
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2182
+ # object reference to use this method on
2183
+ # @param ipv4only [Integer, #to_int, #to_i]
2184
+ # @return [void]
2185
+ def self.set_ipv4only(self_p, ipv4only)
2186
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2187
+ ipv4only = Integer(ipv4only)
2188
+ result = ::CZMQ::FFI.zsock_set_ipv4only(self_p, ipv4only)
2189
+ result
2190
+ end
2191
+
2192
+ # Set socket option `delay_attach_on_connect`.
2193
+ #
2194
+ # @param delay_attach_on_connect [Integer, #to_int, #to_i]
2195
+ # @return [void]
2196
+ def set_delay_attach_on_connect(delay_attach_on_connect)
2197
+ raise DestroyedError unless @ptr
2198
+ self_p = @ptr
2199
+ delay_attach_on_connect = Integer(delay_attach_on_connect)
2200
+ result = ::CZMQ::FFI.zsock_set_delay_attach_on_connect(self_p, delay_attach_on_connect)
2201
+ result
2202
+ end
2203
+
2204
+ # Set socket option `delay_attach_on_connect`.
2205
+ #
2206
+ # This is the polymorphic version of #set_delay_attach_on_connect.
2207
+ #
2208
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2209
+ # object reference to use this method on
2210
+ # @param delay_attach_on_connect [Integer, #to_int, #to_i]
2211
+ # @return [void]
2212
+ def self.set_delay_attach_on_connect(self_p, delay_attach_on_connect)
2213
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2214
+ delay_attach_on_connect = Integer(delay_attach_on_connect)
2215
+ result = ::CZMQ::FFI.zsock_set_delay_attach_on_connect(self_p, delay_attach_on_connect)
2216
+ result
2217
+ end
2218
+
2219
+ # Get socket option `type`.
2220
+ #
2221
+ # @return [Integer]
2222
+ def type()
2223
+ raise DestroyedError unless @ptr
2224
+ self_p = @ptr
2225
+ result = ::CZMQ::FFI.zsock_type(self_p)
2226
+ result
2227
+ end
2228
+
2229
+ # Get socket option `type`.
2230
+ #
2231
+ # This is the polymorphic version of #type.
2232
+ #
2233
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2234
+ # object reference to use this method on
2235
+ # @return [Integer]
2236
+ def self.type(self_p)
2237
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2238
+ result = ::CZMQ::FFI.zsock_type(self_p)
2239
+ result
2240
+ end
2241
+
2242
+ # Get socket option `sndhwm`.
2243
+ #
2244
+ # @return [Integer]
2245
+ def sndhwm()
2246
+ raise DestroyedError unless @ptr
2247
+ self_p = @ptr
2248
+ result = ::CZMQ::FFI.zsock_sndhwm(self_p)
2249
+ result
2250
+ end
2251
+
2252
+ # Get socket option `sndhwm`.
2253
+ #
2254
+ # This is the polymorphic version of #sndhwm.
2255
+ #
2256
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2257
+ # object reference to use this method on
2258
+ # @return [Integer]
2259
+ def self.sndhwm(self_p)
2260
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2261
+ result = ::CZMQ::FFI.zsock_sndhwm(self_p)
2262
+ result
2263
+ end
2264
+
2265
+ # Set socket option `sndhwm`.
2266
+ #
2267
+ # @param sndhwm [Integer, #to_int, #to_i]
2268
+ # @return [void]
2269
+ def set_sndhwm(sndhwm)
2270
+ raise DestroyedError unless @ptr
2271
+ self_p = @ptr
2272
+ sndhwm = Integer(sndhwm)
2273
+ result = ::CZMQ::FFI.zsock_set_sndhwm(self_p, sndhwm)
2274
+ result
2275
+ end
2276
+
2277
+ # Set socket option `sndhwm`.
2278
+ #
2279
+ # This is the polymorphic version of #set_sndhwm.
2280
+ #
2281
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2282
+ # object reference to use this method on
2283
+ # @param sndhwm [Integer, #to_int, #to_i]
2284
+ # @return [void]
2285
+ def self.set_sndhwm(self_p, sndhwm)
2286
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2287
+ sndhwm = Integer(sndhwm)
2288
+ result = ::CZMQ::FFI.zsock_set_sndhwm(self_p, sndhwm)
2289
+ result
2290
+ end
2291
+
2292
+ # Get socket option `rcvhwm`.
2293
+ #
2294
+ # @return [Integer]
2295
+ def rcvhwm()
2296
+ raise DestroyedError unless @ptr
2297
+ self_p = @ptr
2298
+ result = ::CZMQ::FFI.zsock_rcvhwm(self_p)
2299
+ result
2300
+ end
2301
+
2302
+ # Get socket option `rcvhwm`.
2303
+ #
2304
+ # This is the polymorphic version of #rcvhwm.
2305
+ #
2306
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2307
+ # object reference to use this method on
2308
+ # @return [Integer]
2309
+ def self.rcvhwm(self_p)
2310
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2311
+ result = ::CZMQ::FFI.zsock_rcvhwm(self_p)
2312
+ result
2313
+ end
2314
+
2315
+ # Set socket option `rcvhwm`.
2316
+ #
2317
+ # @param rcvhwm [Integer, #to_int, #to_i]
2318
+ # @return [void]
2319
+ def set_rcvhwm(rcvhwm)
2320
+ raise DestroyedError unless @ptr
2321
+ self_p = @ptr
2322
+ rcvhwm = Integer(rcvhwm)
2323
+ result = ::CZMQ::FFI.zsock_set_rcvhwm(self_p, rcvhwm)
2324
+ result
2325
+ end
2326
+
2327
+ # Set socket option `rcvhwm`.
2328
+ #
2329
+ # This is the polymorphic version of #set_rcvhwm.
2330
+ #
2331
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2332
+ # object reference to use this method on
2333
+ # @param rcvhwm [Integer, #to_int, #to_i]
2334
+ # @return [void]
2335
+ def self.set_rcvhwm(self_p, rcvhwm)
2336
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2337
+ rcvhwm = Integer(rcvhwm)
2338
+ result = ::CZMQ::FFI.zsock_set_rcvhwm(self_p, rcvhwm)
2339
+ result
2340
+ end
2341
+
2342
+ # Get socket option `affinity`.
2343
+ #
2344
+ # @return [Integer]
2345
+ def affinity()
2346
+ raise DestroyedError unless @ptr
2347
+ self_p = @ptr
2348
+ result = ::CZMQ::FFI.zsock_affinity(self_p)
2349
+ result
2350
+ end
2351
+
2352
+ # Get socket option `affinity`.
2353
+ #
2354
+ # This is the polymorphic version of #affinity.
2355
+ #
2356
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2357
+ # object reference to use this method on
2358
+ # @return [Integer]
2359
+ def self.affinity(self_p)
2360
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2361
+ result = ::CZMQ::FFI.zsock_affinity(self_p)
2362
+ result
2363
+ end
2364
+
2365
+ # Set socket option `affinity`.
2366
+ #
2367
+ # @param affinity [Integer, #to_int, #to_i]
2368
+ # @return [void]
2369
+ def set_affinity(affinity)
2370
+ raise DestroyedError unless @ptr
2371
+ self_p = @ptr
2372
+ affinity = Integer(affinity)
2373
+ result = ::CZMQ::FFI.zsock_set_affinity(self_p, affinity)
2374
+ result
2375
+ end
2376
+
2377
+ # Set socket option `affinity`.
2378
+ #
2379
+ # This is the polymorphic version of #set_affinity.
2380
+ #
2381
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2382
+ # object reference to use this method on
2383
+ # @param affinity [Integer, #to_int, #to_i]
2384
+ # @return [void]
2385
+ def self.set_affinity(self_p, affinity)
2386
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2387
+ affinity = Integer(affinity)
2388
+ result = ::CZMQ::FFI.zsock_set_affinity(self_p, affinity)
2389
+ result
2390
+ end
2391
+
2392
+ # Set socket option `subscribe`.
2393
+ #
2394
+ # @param subscribe [String, #to_s, nil]
2395
+ # @return [void]
2396
+ def set_subscribe(subscribe)
2397
+ raise DestroyedError unless @ptr
2398
+ self_p = @ptr
2399
+ result = ::CZMQ::FFI.zsock_set_subscribe(self_p, subscribe)
2400
+ result
2401
+ end
2402
+
2403
+ # Set socket option `subscribe`.
2404
+ #
2405
+ # This is the polymorphic version of #set_subscribe.
2406
+ #
2407
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2408
+ # object reference to use this method on
2409
+ # @param subscribe [String, #to_s, nil]
2410
+ # @return [void]
2411
+ def self.set_subscribe(self_p, subscribe)
2412
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2413
+ result = ::CZMQ::FFI.zsock_set_subscribe(self_p, subscribe)
2414
+ result
2415
+ end
2416
+
2417
+ # Set socket option `unsubscribe`.
2418
+ #
2419
+ # @param unsubscribe [String, #to_s, nil]
2420
+ # @return [void]
2421
+ def set_unsubscribe(unsubscribe)
2422
+ raise DestroyedError unless @ptr
2423
+ self_p = @ptr
2424
+ result = ::CZMQ::FFI.zsock_set_unsubscribe(self_p, unsubscribe)
2425
+ result
2426
+ end
2427
+
2428
+ # Set socket option `unsubscribe`.
2429
+ #
2430
+ # This is the polymorphic version of #set_unsubscribe.
2431
+ #
2432
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2433
+ # object reference to use this method on
2434
+ # @param unsubscribe [String, #to_s, nil]
2435
+ # @return [void]
2436
+ def self.set_unsubscribe(self_p, unsubscribe)
2437
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2438
+ result = ::CZMQ::FFI.zsock_set_unsubscribe(self_p, unsubscribe)
2439
+ result
2440
+ end
2441
+
2442
+ # Get socket option `identity`.
2443
+ #
2444
+ # @return [::FFI::AutoPointer]
2445
+ def identity()
2446
+ raise DestroyedError unless @ptr
2447
+ self_p = @ptr
2448
+ result = ::CZMQ::FFI.zsock_identity(self_p)
2449
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
2450
+ result
2451
+ end
2452
+
2453
+ # Get socket option `identity`.
2454
+ #
2455
+ # This is the polymorphic version of #identity.
2456
+ #
2457
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2458
+ # object reference to use this method on
2459
+ # @return [::FFI::AutoPointer]
2460
+ def self.identity(self_p)
2461
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2462
+ result = ::CZMQ::FFI.zsock_identity(self_p)
2463
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
2464
+ result
2465
+ end
2466
+
2467
+ # Set socket option `identity`.
2468
+ #
2469
+ # @param identity [String, #to_s, nil]
2470
+ # @return [void]
2471
+ def set_identity(identity)
2472
+ raise DestroyedError unless @ptr
2473
+ self_p = @ptr
2474
+ result = ::CZMQ::FFI.zsock_set_identity(self_p, identity)
2475
+ result
2476
+ end
2477
+
2478
+ # Set socket option `identity`.
2479
+ #
2480
+ # This is the polymorphic version of #set_identity.
2481
+ #
2482
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2483
+ # object reference to use this method on
2484
+ # @param identity [String, #to_s, nil]
2485
+ # @return [void]
2486
+ def self.set_identity(self_p, identity)
2487
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2488
+ result = ::CZMQ::FFI.zsock_set_identity(self_p, identity)
2489
+ result
2490
+ end
2491
+
2492
+ # Get socket option `rate`.
2493
+ #
2494
+ # @return [Integer]
2495
+ def rate()
2496
+ raise DestroyedError unless @ptr
2497
+ self_p = @ptr
2498
+ result = ::CZMQ::FFI.zsock_rate(self_p)
2499
+ result
2500
+ end
2501
+
2502
+ # Get socket option `rate`.
2503
+ #
2504
+ # This is the polymorphic version of #rate.
2505
+ #
2506
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2507
+ # object reference to use this method on
2508
+ # @return [Integer]
2509
+ def self.rate(self_p)
2510
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2511
+ result = ::CZMQ::FFI.zsock_rate(self_p)
2512
+ result
2513
+ end
2514
+
2515
+ # Set socket option `rate`.
2516
+ #
2517
+ # @param rate [Integer, #to_int, #to_i]
2518
+ # @return [void]
2519
+ def set_rate(rate)
2520
+ raise DestroyedError unless @ptr
2521
+ self_p = @ptr
2522
+ rate = Integer(rate)
2523
+ result = ::CZMQ::FFI.zsock_set_rate(self_p, rate)
2524
+ result
2525
+ end
2526
+
2527
+ # Set socket option `rate`.
2528
+ #
2529
+ # This is the polymorphic version of #set_rate.
2530
+ #
2531
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2532
+ # object reference to use this method on
2533
+ # @param rate [Integer, #to_int, #to_i]
2534
+ # @return [void]
2535
+ def self.set_rate(self_p, rate)
2536
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2537
+ rate = Integer(rate)
2538
+ result = ::CZMQ::FFI.zsock_set_rate(self_p, rate)
2539
+ result
2540
+ end
2541
+
2542
+ # Get socket option `recovery_ivl`.
2543
+ #
2544
+ # @return [Integer]
2545
+ def recovery_ivl()
2546
+ raise DestroyedError unless @ptr
2547
+ self_p = @ptr
2548
+ result = ::CZMQ::FFI.zsock_recovery_ivl(self_p)
2549
+ result
2550
+ end
2551
+
2552
+ # Get socket option `recovery_ivl`.
2553
+ #
2554
+ # This is the polymorphic version of #recovery_ivl.
2555
+ #
2556
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2557
+ # object reference to use this method on
2558
+ # @return [Integer]
2559
+ def self.recovery_ivl(self_p)
2560
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2561
+ result = ::CZMQ::FFI.zsock_recovery_ivl(self_p)
2562
+ result
2563
+ end
2564
+
2565
+ # Set socket option `recovery_ivl`.
2566
+ #
2567
+ # @param recovery_ivl [Integer, #to_int, #to_i]
2568
+ # @return [void]
2569
+ def set_recovery_ivl(recovery_ivl)
2570
+ raise DestroyedError unless @ptr
2571
+ self_p = @ptr
2572
+ recovery_ivl = Integer(recovery_ivl)
2573
+ result = ::CZMQ::FFI.zsock_set_recovery_ivl(self_p, recovery_ivl)
2574
+ result
2575
+ end
2576
+
2577
+ # Set socket option `recovery_ivl`.
2578
+ #
2579
+ # This is the polymorphic version of #set_recovery_ivl.
2580
+ #
2581
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2582
+ # object reference to use this method on
2583
+ # @param recovery_ivl [Integer, #to_int, #to_i]
2584
+ # @return [void]
2585
+ def self.set_recovery_ivl(self_p, recovery_ivl)
2586
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2587
+ recovery_ivl = Integer(recovery_ivl)
2588
+ result = ::CZMQ::FFI.zsock_set_recovery_ivl(self_p, recovery_ivl)
2589
+ result
2590
+ end
2591
+
2592
+ # Get socket option `sndbuf`.
2593
+ #
2594
+ # @return [Integer]
2595
+ def sndbuf()
2596
+ raise DestroyedError unless @ptr
2597
+ self_p = @ptr
2598
+ result = ::CZMQ::FFI.zsock_sndbuf(self_p)
2599
+ result
2600
+ end
2601
+
2602
+ # Get socket option `sndbuf`.
2603
+ #
2604
+ # This is the polymorphic version of #sndbuf.
2605
+ #
2606
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2607
+ # object reference to use this method on
2608
+ # @return [Integer]
2609
+ def self.sndbuf(self_p)
2610
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2611
+ result = ::CZMQ::FFI.zsock_sndbuf(self_p)
2612
+ result
2613
+ end
2614
+
2615
+ # Set socket option `sndbuf`.
2616
+ #
2617
+ # @param sndbuf [Integer, #to_int, #to_i]
2618
+ # @return [void]
2619
+ def set_sndbuf(sndbuf)
2620
+ raise DestroyedError unless @ptr
2621
+ self_p = @ptr
2622
+ sndbuf = Integer(sndbuf)
2623
+ result = ::CZMQ::FFI.zsock_set_sndbuf(self_p, sndbuf)
2624
+ result
2625
+ end
2626
+
2627
+ # Set socket option `sndbuf`.
2628
+ #
2629
+ # This is the polymorphic version of #set_sndbuf.
2630
+ #
2631
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2632
+ # object reference to use this method on
2633
+ # @param sndbuf [Integer, #to_int, #to_i]
2634
+ # @return [void]
2635
+ def self.set_sndbuf(self_p, sndbuf)
2636
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2637
+ sndbuf = Integer(sndbuf)
2638
+ result = ::CZMQ::FFI.zsock_set_sndbuf(self_p, sndbuf)
2639
+ result
2640
+ end
2641
+
2642
+ # Get socket option `rcvbuf`.
2643
+ #
2644
+ # @return [Integer]
2645
+ def rcvbuf()
2646
+ raise DestroyedError unless @ptr
2647
+ self_p = @ptr
2648
+ result = ::CZMQ::FFI.zsock_rcvbuf(self_p)
2649
+ result
2650
+ end
2651
+
2652
+ # Get socket option `rcvbuf`.
2653
+ #
2654
+ # This is the polymorphic version of #rcvbuf.
2655
+ #
2656
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2657
+ # object reference to use this method on
2658
+ # @return [Integer]
2659
+ def self.rcvbuf(self_p)
2660
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2661
+ result = ::CZMQ::FFI.zsock_rcvbuf(self_p)
2662
+ result
2663
+ end
2664
+
2665
+ # Set socket option `rcvbuf`.
2666
+ #
2667
+ # @param rcvbuf [Integer, #to_int, #to_i]
2668
+ # @return [void]
2669
+ def set_rcvbuf(rcvbuf)
2670
+ raise DestroyedError unless @ptr
2671
+ self_p = @ptr
2672
+ rcvbuf = Integer(rcvbuf)
2673
+ result = ::CZMQ::FFI.zsock_set_rcvbuf(self_p, rcvbuf)
2674
+ result
2675
+ end
2676
+
2677
+ # Set socket option `rcvbuf`.
2678
+ #
2679
+ # This is the polymorphic version of #set_rcvbuf.
2680
+ #
2681
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2682
+ # object reference to use this method on
2683
+ # @param rcvbuf [Integer, #to_int, #to_i]
2684
+ # @return [void]
2685
+ def self.set_rcvbuf(self_p, rcvbuf)
2686
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2687
+ rcvbuf = Integer(rcvbuf)
2688
+ result = ::CZMQ::FFI.zsock_set_rcvbuf(self_p, rcvbuf)
2689
+ result
2690
+ end
2691
+
2692
+ # Get socket option `linger`.
2693
+ #
2694
+ # @return [Integer]
2695
+ def linger()
2696
+ raise DestroyedError unless @ptr
2697
+ self_p = @ptr
2698
+ result = ::CZMQ::FFI.zsock_linger(self_p)
2699
+ result
2700
+ end
2701
+
2702
+ # Get socket option `linger`.
2703
+ #
2704
+ # This is the polymorphic version of #linger.
2705
+ #
2706
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2707
+ # object reference to use this method on
2708
+ # @return [Integer]
2709
+ def self.linger(self_p)
2710
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2711
+ result = ::CZMQ::FFI.zsock_linger(self_p)
2712
+ result
2713
+ end
2714
+
2715
+ # Set socket option `linger`.
2716
+ #
2717
+ # @param linger [Integer, #to_int, #to_i]
2718
+ # @return [void]
2719
+ def set_linger(linger)
2720
+ raise DestroyedError unless @ptr
2721
+ self_p = @ptr
2722
+ linger = Integer(linger)
2723
+ result = ::CZMQ::FFI.zsock_set_linger(self_p, linger)
2724
+ result
2725
+ end
2726
+
2727
+ # Set socket option `linger`.
2728
+ #
2729
+ # This is the polymorphic version of #set_linger.
2730
+ #
2731
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2732
+ # object reference to use this method on
2733
+ # @param linger [Integer, #to_int, #to_i]
2734
+ # @return [void]
2735
+ def self.set_linger(self_p, linger)
2736
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2737
+ linger = Integer(linger)
2738
+ result = ::CZMQ::FFI.zsock_set_linger(self_p, linger)
2739
+ result
2740
+ end
2741
+
2742
+ # Get socket option `reconnect_ivl`.
2743
+ #
2744
+ # @return [Integer]
2745
+ def reconnect_ivl()
2746
+ raise DestroyedError unless @ptr
2747
+ self_p = @ptr
2748
+ result = ::CZMQ::FFI.zsock_reconnect_ivl(self_p)
2749
+ result
2750
+ end
2751
+
2752
+ # Get socket option `reconnect_ivl`.
2753
+ #
2754
+ # This is the polymorphic version of #reconnect_ivl.
2755
+ #
2756
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2757
+ # object reference to use this method on
2758
+ # @return [Integer]
2759
+ def self.reconnect_ivl(self_p)
2760
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2761
+ result = ::CZMQ::FFI.zsock_reconnect_ivl(self_p)
2762
+ result
2763
+ end
2764
+
2765
+ # Set socket option `reconnect_ivl`.
2766
+ #
2767
+ # @param reconnect_ivl [Integer, #to_int, #to_i]
2768
+ # @return [void]
2769
+ def set_reconnect_ivl(reconnect_ivl)
2770
+ raise DestroyedError unless @ptr
2771
+ self_p = @ptr
2772
+ reconnect_ivl = Integer(reconnect_ivl)
2773
+ result = ::CZMQ::FFI.zsock_set_reconnect_ivl(self_p, reconnect_ivl)
2774
+ result
2775
+ end
2776
+
2777
+ # Set socket option `reconnect_ivl`.
2778
+ #
2779
+ # This is the polymorphic version of #set_reconnect_ivl.
2780
+ #
2781
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2782
+ # object reference to use this method on
2783
+ # @param reconnect_ivl [Integer, #to_int, #to_i]
2784
+ # @return [void]
2785
+ def self.set_reconnect_ivl(self_p, reconnect_ivl)
2786
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2787
+ reconnect_ivl = Integer(reconnect_ivl)
2788
+ result = ::CZMQ::FFI.zsock_set_reconnect_ivl(self_p, reconnect_ivl)
2789
+ result
2790
+ end
2791
+
2792
+ # Get socket option `reconnect_ivl_max`.
2793
+ #
2794
+ # @return [Integer]
2795
+ def reconnect_ivl_max()
2796
+ raise DestroyedError unless @ptr
2797
+ self_p = @ptr
2798
+ result = ::CZMQ::FFI.zsock_reconnect_ivl_max(self_p)
2799
+ result
2800
+ end
2801
+
2802
+ # Get socket option `reconnect_ivl_max`.
2803
+ #
2804
+ # This is the polymorphic version of #reconnect_ivl_max.
2805
+ #
2806
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2807
+ # object reference to use this method on
2808
+ # @return [Integer]
2809
+ def self.reconnect_ivl_max(self_p)
2810
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2811
+ result = ::CZMQ::FFI.zsock_reconnect_ivl_max(self_p)
2812
+ result
2813
+ end
2814
+
2815
+ # Set socket option `reconnect_ivl_max`.
2816
+ #
2817
+ # @param reconnect_ivl_max [Integer, #to_int, #to_i]
2818
+ # @return [void]
2819
+ def set_reconnect_ivl_max(reconnect_ivl_max)
2820
+ raise DestroyedError unless @ptr
2821
+ self_p = @ptr
2822
+ reconnect_ivl_max = Integer(reconnect_ivl_max)
2823
+ result = ::CZMQ::FFI.zsock_set_reconnect_ivl_max(self_p, reconnect_ivl_max)
2824
+ result
2825
+ end
2826
+
2827
+ # Set socket option `reconnect_ivl_max`.
2828
+ #
2829
+ # This is the polymorphic version of #set_reconnect_ivl_max.
2830
+ #
2831
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2832
+ # object reference to use this method on
2833
+ # @param reconnect_ivl_max [Integer, #to_int, #to_i]
2834
+ # @return [void]
2835
+ def self.set_reconnect_ivl_max(self_p, reconnect_ivl_max)
2836
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2837
+ reconnect_ivl_max = Integer(reconnect_ivl_max)
2838
+ result = ::CZMQ::FFI.zsock_set_reconnect_ivl_max(self_p, reconnect_ivl_max)
2839
+ result
2840
+ end
2841
+
2842
+ # Get socket option `backlog`.
2843
+ #
2844
+ # @return [Integer]
2845
+ def backlog()
2846
+ raise DestroyedError unless @ptr
2847
+ self_p = @ptr
2848
+ result = ::CZMQ::FFI.zsock_backlog(self_p)
2849
+ result
2850
+ end
2851
+
2852
+ # Get socket option `backlog`.
2853
+ #
2854
+ # This is the polymorphic version of #backlog.
2855
+ #
2856
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2857
+ # object reference to use this method on
2858
+ # @return [Integer]
2859
+ def self.backlog(self_p)
2860
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2861
+ result = ::CZMQ::FFI.zsock_backlog(self_p)
2862
+ result
2863
+ end
2864
+
2865
+ # Set socket option `backlog`.
2866
+ #
2867
+ # @param backlog [Integer, #to_int, #to_i]
2868
+ # @return [void]
2869
+ def set_backlog(backlog)
2870
+ raise DestroyedError unless @ptr
2871
+ self_p = @ptr
2872
+ backlog = Integer(backlog)
2873
+ result = ::CZMQ::FFI.zsock_set_backlog(self_p, backlog)
2874
+ result
2875
+ end
2876
+
2877
+ # Set socket option `backlog`.
2878
+ #
2879
+ # This is the polymorphic version of #set_backlog.
2880
+ #
2881
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2882
+ # object reference to use this method on
2883
+ # @param backlog [Integer, #to_int, #to_i]
2884
+ # @return [void]
2885
+ def self.set_backlog(self_p, backlog)
2886
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2887
+ backlog = Integer(backlog)
2888
+ result = ::CZMQ::FFI.zsock_set_backlog(self_p, backlog)
2889
+ result
2890
+ end
2891
+
2892
+ # Get socket option `maxmsgsize`.
2893
+ #
2894
+ # @return [Integer]
2895
+ def maxmsgsize()
2896
+ raise DestroyedError unless @ptr
2897
+ self_p = @ptr
2898
+ result = ::CZMQ::FFI.zsock_maxmsgsize(self_p)
2899
+ result
2900
+ end
2901
+
2902
+ # Get socket option `maxmsgsize`.
2903
+ #
2904
+ # This is the polymorphic version of #maxmsgsize.
2905
+ #
2906
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2907
+ # object reference to use this method on
2908
+ # @return [Integer]
2909
+ def self.maxmsgsize(self_p)
2910
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2911
+ result = ::CZMQ::FFI.zsock_maxmsgsize(self_p)
2912
+ result
2913
+ end
2914
+
2915
+ # Set socket option `maxmsgsize`.
2916
+ #
2917
+ # @param maxmsgsize [Integer, #to_int, #to_i]
2918
+ # @return [void]
2919
+ def set_maxmsgsize(maxmsgsize)
2920
+ raise DestroyedError unless @ptr
2921
+ self_p = @ptr
2922
+ maxmsgsize = Integer(maxmsgsize)
2923
+ result = ::CZMQ::FFI.zsock_set_maxmsgsize(self_p, maxmsgsize)
2924
+ result
2925
+ end
2926
+
2927
+ # Set socket option `maxmsgsize`.
2928
+ #
2929
+ # This is the polymorphic version of #set_maxmsgsize.
2930
+ #
2931
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2932
+ # object reference to use this method on
2933
+ # @param maxmsgsize [Integer, #to_int, #to_i]
2934
+ # @return [void]
2935
+ def self.set_maxmsgsize(self_p, maxmsgsize)
2936
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2937
+ maxmsgsize = Integer(maxmsgsize)
2938
+ result = ::CZMQ::FFI.zsock_set_maxmsgsize(self_p, maxmsgsize)
2939
+ result
2940
+ end
2941
+
2942
+ # Get socket option `multicast_hops`.
2943
+ #
2944
+ # @return [Integer]
2945
+ def multicast_hops()
2946
+ raise DestroyedError unless @ptr
2947
+ self_p = @ptr
2948
+ result = ::CZMQ::FFI.zsock_multicast_hops(self_p)
2949
+ result
2950
+ end
2951
+
2952
+ # Get socket option `multicast_hops`.
2953
+ #
2954
+ # This is the polymorphic version of #multicast_hops.
2955
+ #
2956
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2957
+ # object reference to use this method on
2958
+ # @return [Integer]
2959
+ def self.multicast_hops(self_p)
2960
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2961
+ result = ::CZMQ::FFI.zsock_multicast_hops(self_p)
2962
+ result
2963
+ end
2964
+
2965
+ # Set socket option `multicast_hops`.
2966
+ #
2967
+ # @param multicast_hops [Integer, #to_int, #to_i]
2968
+ # @return [void]
2969
+ def set_multicast_hops(multicast_hops)
2970
+ raise DestroyedError unless @ptr
2971
+ self_p = @ptr
2972
+ multicast_hops = Integer(multicast_hops)
2973
+ result = ::CZMQ::FFI.zsock_set_multicast_hops(self_p, multicast_hops)
2974
+ result
2975
+ end
2976
+
2977
+ # Set socket option `multicast_hops`.
2978
+ #
2979
+ # This is the polymorphic version of #set_multicast_hops.
2980
+ #
2981
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
2982
+ # object reference to use this method on
2983
+ # @param multicast_hops [Integer, #to_int, #to_i]
2984
+ # @return [void]
2985
+ def self.set_multicast_hops(self_p, multicast_hops)
2986
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
2987
+ multicast_hops = Integer(multicast_hops)
2988
+ result = ::CZMQ::FFI.zsock_set_multicast_hops(self_p, multicast_hops)
2989
+ result
2990
+ end
2991
+
2992
+ # Get socket option `rcvtimeo`.
2993
+ #
2994
+ # @return [Integer]
2995
+ def rcvtimeo()
2996
+ raise DestroyedError unless @ptr
2997
+ self_p = @ptr
2998
+ result = ::CZMQ::FFI.zsock_rcvtimeo(self_p)
2999
+ result
3000
+ end
3001
+
3002
+ # Get socket option `rcvtimeo`.
3003
+ #
3004
+ # This is the polymorphic version of #rcvtimeo.
3005
+ #
3006
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3007
+ # object reference to use this method on
3008
+ # @return [Integer]
3009
+ def self.rcvtimeo(self_p)
3010
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3011
+ result = ::CZMQ::FFI.zsock_rcvtimeo(self_p)
3012
+ result
3013
+ end
3014
+
3015
+ # Set socket option `rcvtimeo`.
3016
+ #
3017
+ # @param rcvtimeo [Integer, #to_int, #to_i]
3018
+ # @return [void]
3019
+ def set_rcvtimeo(rcvtimeo)
3020
+ raise DestroyedError unless @ptr
3021
+ self_p = @ptr
3022
+ rcvtimeo = Integer(rcvtimeo)
3023
+ result = ::CZMQ::FFI.zsock_set_rcvtimeo(self_p, rcvtimeo)
3024
+ result
3025
+ end
3026
+
3027
+ # Set socket option `rcvtimeo`.
3028
+ #
3029
+ # This is the polymorphic version of #set_rcvtimeo.
3030
+ #
3031
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3032
+ # object reference to use this method on
3033
+ # @param rcvtimeo [Integer, #to_int, #to_i]
3034
+ # @return [void]
3035
+ def self.set_rcvtimeo(self_p, rcvtimeo)
3036
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3037
+ rcvtimeo = Integer(rcvtimeo)
3038
+ result = ::CZMQ::FFI.zsock_set_rcvtimeo(self_p, rcvtimeo)
3039
+ result
3040
+ end
3041
+
3042
+ # Get socket option `sndtimeo`.
3043
+ #
3044
+ # @return [Integer]
3045
+ def sndtimeo()
3046
+ raise DestroyedError unless @ptr
3047
+ self_p = @ptr
3048
+ result = ::CZMQ::FFI.zsock_sndtimeo(self_p)
3049
+ result
3050
+ end
3051
+
3052
+ # Get socket option `sndtimeo`.
3053
+ #
3054
+ # This is the polymorphic version of #sndtimeo.
3055
+ #
3056
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3057
+ # object reference to use this method on
3058
+ # @return [Integer]
3059
+ def self.sndtimeo(self_p)
3060
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3061
+ result = ::CZMQ::FFI.zsock_sndtimeo(self_p)
3062
+ result
3063
+ end
3064
+
3065
+ # Set socket option `sndtimeo`.
3066
+ #
3067
+ # @param sndtimeo [Integer, #to_int, #to_i]
3068
+ # @return [void]
3069
+ def set_sndtimeo(sndtimeo)
3070
+ raise DestroyedError unless @ptr
3071
+ self_p = @ptr
3072
+ sndtimeo = Integer(sndtimeo)
3073
+ result = ::CZMQ::FFI.zsock_set_sndtimeo(self_p, sndtimeo)
3074
+ result
3075
+ end
3076
+
3077
+ # Set socket option `sndtimeo`.
3078
+ #
3079
+ # This is the polymorphic version of #set_sndtimeo.
3080
+ #
3081
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3082
+ # object reference to use this method on
3083
+ # @param sndtimeo [Integer, #to_int, #to_i]
3084
+ # @return [void]
3085
+ def self.set_sndtimeo(self_p, sndtimeo)
3086
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3087
+ sndtimeo = Integer(sndtimeo)
3088
+ result = ::CZMQ::FFI.zsock_set_sndtimeo(self_p, sndtimeo)
3089
+ result
3090
+ end
3091
+
3092
+ # Set socket option `xpub_verbose`.
3093
+ #
3094
+ # @param xpub_verbose [Integer, #to_int, #to_i]
3095
+ # @return [void]
3096
+ def set_xpub_verbose(xpub_verbose)
3097
+ raise DestroyedError unless @ptr
3098
+ self_p = @ptr
3099
+ xpub_verbose = Integer(xpub_verbose)
3100
+ result = ::CZMQ::FFI.zsock_set_xpub_verbose(self_p, xpub_verbose)
3101
+ result
3102
+ end
3103
+
3104
+ # Set socket option `xpub_verbose`.
3105
+ #
3106
+ # This is the polymorphic version of #set_xpub_verbose.
3107
+ #
3108
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3109
+ # object reference to use this method on
3110
+ # @param xpub_verbose [Integer, #to_int, #to_i]
3111
+ # @return [void]
3112
+ def self.set_xpub_verbose(self_p, xpub_verbose)
3113
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3114
+ xpub_verbose = Integer(xpub_verbose)
3115
+ result = ::CZMQ::FFI.zsock_set_xpub_verbose(self_p, xpub_verbose)
3116
+ result
3117
+ end
3118
+
3119
+ # Get socket option `tcp_keepalive`.
3120
+ #
3121
+ # @return [Integer]
3122
+ def tcp_keepalive()
3123
+ raise DestroyedError unless @ptr
3124
+ self_p = @ptr
3125
+ result = ::CZMQ::FFI.zsock_tcp_keepalive(self_p)
3126
+ result
3127
+ end
3128
+
3129
+ # Get socket option `tcp_keepalive`.
3130
+ #
3131
+ # This is the polymorphic version of #tcp_keepalive.
3132
+ #
3133
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3134
+ # object reference to use this method on
3135
+ # @return [Integer]
3136
+ def self.tcp_keepalive(self_p)
3137
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3138
+ result = ::CZMQ::FFI.zsock_tcp_keepalive(self_p)
3139
+ result
3140
+ end
3141
+
3142
+ # Set socket option `tcp_keepalive`.
3143
+ #
3144
+ # @param tcp_keepalive [Integer, #to_int, #to_i]
3145
+ # @return [void]
3146
+ def set_tcp_keepalive(tcp_keepalive)
3147
+ raise DestroyedError unless @ptr
3148
+ self_p = @ptr
3149
+ tcp_keepalive = Integer(tcp_keepalive)
3150
+ result = ::CZMQ::FFI.zsock_set_tcp_keepalive(self_p, tcp_keepalive)
3151
+ result
3152
+ end
3153
+
3154
+ # Set socket option `tcp_keepalive`.
3155
+ #
3156
+ # This is the polymorphic version of #set_tcp_keepalive.
3157
+ #
3158
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3159
+ # object reference to use this method on
3160
+ # @param tcp_keepalive [Integer, #to_int, #to_i]
3161
+ # @return [void]
3162
+ def self.set_tcp_keepalive(self_p, tcp_keepalive)
3163
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3164
+ tcp_keepalive = Integer(tcp_keepalive)
3165
+ result = ::CZMQ::FFI.zsock_set_tcp_keepalive(self_p, tcp_keepalive)
3166
+ result
3167
+ end
3168
+
3169
+ # Get socket option `tcp_keepalive_idle`.
3170
+ #
3171
+ # @return [Integer]
3172
+ def tcp_keepalive_idle()
3173
+ raise DestroyedError unless @ptr
3174
+ self_p = @ptr
3175
+ result = ::CZMQ::FFI.zsock_tcp_keepalive_idle(self_p)
3176
+ result
3177
+ end
3178
+
3179
+ # Get socket option `tcp_keepalive_idle`.
3180
+ #
3181
+ # This is the polymorphic version of #tcp_keepalive_idle.
3182
+ #
3183
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3184
+ # object reference to use this method on
3185
+ # @return [Integer]
3186
+ def self.tcp_keepalive_idle(self_p)
3187
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3188
+ result = ::CZMQ::FFI.zsock_tcp_keepalive_idle(self_p)
3189
+ result
3190
+ end
3191
+
3192
+ # Set socket option `tcp_keepalive_idle`.
3193
+ #
3194
+ # @param tcp_keepalive_idle [Integer, #to_int, #to_i]
3195
+ # @return [void]
3196
+ def set_tcp_keepalive_idle(tcp_keepalive_idle)
3197
+ raise DestroyedError unless @ptr
3198
+ self_p = @ptr
3199
+ tcp_keepalive_idle = Integer(tcp_keepalive_idle)
3200
+ result = ::CZMQ::FFI.zsock_set_tcp_keepalive_idle(self_p, tcp_keepalive_idle)
3201
+ result
3202
+ end
3203
+
3204
+ # Set socket option `tcp_keepalive_idle`.
3205
+ #
3206
+ # This is the polymorphic version of #set_tcp_keepalive_idle.
3207
+ #
3208
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3209
+ # object reference to use this method on
3210
+ # @param tcp_keepalive_idle [Integer, #to_int, #to_i]
3211
+ # @return [void]
3212
+ def self.set_tcp_keepalive_idle(self_p, tcp_keepalive_idle)
3213
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3214
+ tcp_keepalive_idle = Integer(tcp_keepalive_idle)
3215
+ result = ::CZMQ::FFI.zsock_set_tcp_keepalive_idle(self_p, tcp_keepalive_idle)
3216
+ result
3217
+ end
3218
+
3219
+ # Get socket option `tcp_keepalive_cnt`.
3220
+ #
3221
+ # @return [Integer]
3222
+ def tcp_keepalive_cnt()
3223
+ raise DestroyedError unless @ptr
3224
+ self_p = @ptr
3225
+ result = ::CZMQ::FFI.zsock_tcp_keepalive_cnt(self_p)
3226
+ result
3227
+ end
3228
+
3229
+ # Get socket option `tcp_keepalive_cnt`.
3230
+ #
3231
+ # This is the polymorphic version of #tcp_keepalive_cnt.
3232
+ #
3233
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3234
+ # object reference to use this method on
3235
+ # @return [Integer]
3236
+ def self.tcp_keepalive_cnt(self_p)
3237
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3238
+ result = ::CZMQ::FFI.zsock_tcp_keepalive_cnt(self_p)
3239
+ result
3240
+ end
3241
+
3242
+ # Set socket option `tcp_keepalive_cnt`.
3243
+ #
3244
+ # @param tcp_keepalive_cnt [Integer, #to_int, #to_i]
3245
+ # @return [void]
3246
+ def set_tcp_keepalive_cnt(tcp_keepalive_cnt)
3247
+ raise DestroyedError unless @ptr
3248
+ self_p = @ptr
3249
+ tcp_keepalive_cnt = Integer(tcp_keepalive_cnt)
3250
+ result = ::CZMQ::FFI.zsock_set_tcp_keepalive_cnt(self_p, tcp_keepalive_cnt)
3251
+ result
3252
+ end
3253
+
3254
+ # Set socket option `tcp_keepalive_cnt`.
3255
+ #
3256
+ # This is the polymorphic version of #set_tcp_keepalive_cnt.
3257
+ #
3258
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3259
+ # object reference to use this method on
3260
+ # @param tcp_keepalive_cnt [Integer, #to_int, #to_i]
3261
+ # @return [void]
3262
+ def self.set_tcp_keepalive_cnt(self_p, tcp_keepalive_cnt)
3263
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3264
+ tcp_keepalive_cnt = Integer(tcp_keepalive_cnt)
3265
+ result = ::CZMQ::FFI.zsock_set_tcp_keepalive_cnt(self_p, tcp_keepalive_cnt)
3266
+ result
3267
+ end
3268
+
3269
+ # Get socket option `tcp_keepalive_intvl`.
3270
+ #
3271
+ # @return [Integer]
3272
+ def tcp_keepalive_intvl()
3273
+ raise DestroyedError unless @ptr
3274
+ self_p = @ptr
3275
+ result = ::CZMQ::FFI.zsock_tcp_keepalive_intvl(self_p)
3276
+ result
3277
+ end
3278
+
3279
+ # Get socket option `tcp_keepalive_intvl`.
3280
+ #
3281
+ # This is the polymorphic version of #tcp_keepalive_intvl.
3282
+ #
3283
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3284
+ # object reference to use this method on
3285
+ # @return [Integer]
3286
+ def self.tcp_keepalive_intvl(self_p)
3287
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3288
+ result = ::CZMQ::FFI.zsock_tcp_keepalive_intvl(self_p)
3289
+ result
3290
+ end
3291
+
3292
+ # Set socket option `tcp_keepalive_intvl`.
3293
+ #
3294
+ # @param tcp_keepalive_intvl [Integer, #to_int, #to_i]
3295
+ # @return [void]
3296
+ def set_tcp_keepalive_intvl(tcp_keepalive_intvl)
3297
+ raise DestroyedError unless @ptr
3298
+ self_p = @ptr
3299
+ tcp_keepalive_intvl = Integer(tcp_keepalive_intvl)
3300
+ result = ::CZMQ::FFI.zsock_set_tcp_keepalive_intvl(self_p, tcp_keepalive_intvl)
3301
+ result
3302
+ end
3303
+
3304
+ # Set socket option `tcp_keepalive_intvl`.
3305
+ #
3306
+ # This is the polymorphic version of #set_tcp_keepalive_intvl.
3307
+ #
3308
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3309
+ # object reference to use this method on
3310
+ # @param tcp_keepalive_intvl [Integer, #to_int, #to_i]
3311
+ # @return [void]
3312
+ def self.set_tcp_keepalive_intvl(self_p, tcp_keepalive_intvl)
3313
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3314
+ tcp_keepalive_intvl = Integer(tcp_keepalive_intvl)
3315
+ result = ::CZMQ::FFI.zsock_set_tcp_keepalive_intvl(self_p, tcp_keepalive_intvl)
3316
+ result
3317
+ end
3318
+
3319
+ # Get socket option `tcp_accept_filter`.
3320
+ #
3321
+ # @return [::FFI::AutoPointer]
3322
+ def tcp_accept_filter()
3323
+ raise DestroyedError unless @ptr
3324
+ self_p = @ptr
3325
+ result = ::CZMQ::FFI.zsock_tcp_accept_filter(self_p)
3326
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
3327
+ result
3328
+ end
3329
+
3330
+ # Get socket option `tcp_accept_filter`.
3331
+ #
3332
+ # This is the polymorphic version of #tcp_accept_filter.
3333
+ #
3334
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3335
+ # object reference to use this method on
3336
+ # @return [::FFI::AutoPointer]
3337
+ def self.tcp_accept_filter(self_p)
3338
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3339
+ result = ::CZMQ::FFI.zsock_tcp_accept_filter(self_p)
3340
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
3341
+ result
3342
+ end
3343
+
3344
+ # Set socket option `tcp_accept_filter`.
3345
+ #
3346
+ # @param tcp_accept_filter [String, #to_s, nil]
3347
+ # @return [void]
3348
+ def set_tcp_accept_filter(tcp_accept_filter)
3349
+ raise DestroyedError unless @ptr
3350
+ self_p = @ptr
3351
+ result = ::CZMQ::FFI.zsock_set_tcp_accept_filter(self_p, tcp_accept_filter)
3352
+ result
3353
+ end
3354
+
3355
+ # Set socket option `tcp_accept_filter`.
3356
+ #
3357
+ # This is the polymorphic version of #set_tcp_accept_filter.
3358
+ #
3359
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3360
+ # object reference to use this method on
3361
+ # @param tcp_accept_filter [String, #to_s, nil]
3362
+ # @return [void]
3363
+ def self.set_tcp_accept_filter(self_p, tcp_accept_filter)
3364
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3365
+ result = ::CZMQ::FFI.zsock_set_tcp_accept_filter(self_p, tcp_accept_filter)
3366
+ result
3367
+ end
3368
+
3369
+ # Get socket option `rcvmore`.
3370
+ #
3371
+ # @return [Integer]
3372
+ def rcvmore()
3373
+ raise DestroyedError unless @ptr
3374
+ self_p = @ptr
3375
+ result = ::CZMQ::FFI.zsock_rcvmore(self_p)
3376
+ result
3377
+ end
3378
+
3379
+ # Get socket option `rcvmore`.
3380
+ #
3381
+ # This is the polymorphic version of #rcvmore.
3382
+ #
3383
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3384
+ # object reference to use this method on
3385
+ # @return [Integer]
3386
+ def self.rcvmore(self_p)
3387
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3388
+ result = ::CZMQ::FFI.zsock_rcvmore(self_p)
3389
+ result
3390
+ end
3391
+
3392
+ # Get socket option `fd`.
3393
+ #
3394
+ # @return [::FFI::Pointer]
3395
+ def fd()
3396
+ raise DestroyedError unless @ptr
3397
+ self_p = @ptr
3398
+ result = ::CZMQ::FFI.zsock_fd(self_p)
3399
+ result
3400
+ end
3401
+
3402
+ # Get socket option `fd`.
3403
+ #
3404
+ # This is the polymorphic version of #fd.
3405
+ #
3406
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3407
+ # object reference to use this method on
3408
+ # @return [::FFI::Pointer]
3409
+ def self.fd(self_p)
3410
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3411
+ result = ::CZMQ::FFI.zsock_fd(self_p)
3412
+ result
3413
+ end
3414
+
3415
+ # Get socket option `events`.
3416
+ #
3417
+ # @return [Integer]
3418
+ def events()
3419
+ raise DestroyedError unless @ptr
3420
+ self_p = @ptr
3421
+ result = ::CZMQ::FFI.zsock_events(self_p)
3422
+ result
3423
+ end
3424
+
3425
+ # Get socket option `events`.
3426
+ #
3427
+ # This is the polymorphic version of #events.
3428
+ #
3429
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3430
+ # object reference to use this method on
3431
+ # @return [Integer]
3432
+ def self.events(self_p)
3433
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3434
+ result = ::CZMQ::FFI.zsock_events(self_p)
3435
+ result
3436
+ end
3437
+
3438
+ # Get socket option `last_endpoint`.
3439
+ #
3440
+ # @return [::FFI::AutoPointer]
3441
+ def last_endpoint()
3442
+ raise DestroyedError unless @ptr
3443
+ self_p = @ptr
3444
+ result = ::CZMQ::FFI.zsock_last_endpoint(self_p)
3445
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
3446
+ result
3447
+ end
3448
+
3449
+ # Get socket option `last_endpoint`.
3450
+ #
3451
+ # This is the polymorphic version of #last_endpoint.
3452
+ #
3453
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
3454
+ # object reference to use this method on
3455
+ # @return [::FFI::AutoPointer]
3456
+ def self.last_endpoint(self_p)
3457
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
3458
+ result = ::CZMQ::FFI.zsock_last_endpoint(self_p)
3459
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
3460
+ result
3461
+ end
3462
+
3463
+ # Self test of this class.
3464
+ #
3465
+ # @param verbose [Boolean]
3466
+ # @return [void]
3467
+ def self.test(verbose)
3468
+ verbose = !(0==verbose||!verbose) # boolean
3469
+ result = ::CZMQ::FFI.zsock_test(verbose)
3470
+ result
3471
+ end
3472
+ end
3473
+ end
3474
+ end
3475
+
3476
+ ################################################################################
3477
+ # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3478
+ # Read the zproject/README.md for information about making permanent changes. #
3479
+ ################################################################################