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 6module 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 # For types 1, 2, 4 and 8 the caller must allocate the memory itself before 648 # calling zsock_brecv. 649 # For types S, the caller must free the value once finished with it, as 650 # zsock_brecv will allocate the buffer. 651 # For type s, the caller must not free the value as it is stored in a 652 # local cache for performance purposes. 653 # For types c, f, u and m the caller must call the appropriate destructor 654 # depending on the object as zsock_brecv will create new objects. 655 # For type p the caller must coordinate with the sender, as it is just a 656 # pointer value being passed. 657 # 658 # @param picture [String, #to_s, nil] 659 # @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs 660 # @return [Integer] 661 def brecv(picture, *args) 662 raise DestroyedError unless @ptr 663 self_p = @ptr 664 result = ::CZMQ::FFI.zsock_brecv(self_p, picture, *args) 665 result 666 end 667 668 # Receive a binary encoded 'picture' message from the socket (or actor). 669 # This method is similar to zsock_recv, except the arguments are encoded 670 # in a binary format that is compatible with zproto, and is designed to 671 # reduce memory allocations. The pattern argument is a string that defines 672 # the type of each argument. See zsock_bsend for the supported argument 673 # types. All arguments must be pointers; this call sets them to point to 674 # values held on a per-socket basis. 675 # For types 1, 2, 4 and 8 the caller must allocate the memory itself before 676 # calling zsock_brecv. 677 # For types S, the caller must free the value once finished with it, as 678 # zsock_brecv will allocate the buffer. 679 # For type s, the caller must not free the value as it is stored in a 680 # local cache for performance purposes. 681 # For types c, f, u and m the caller must call the appropriate destructor 682 # depending on the object as zsock_brecv will create new objects. 683 # For type p the caller must coordinate with the sender, as it is just a 684 # pointer value being passed. 685 # 686 # This is the polymorphic version of #brecv. 687 # 688 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 689 # object reference to use this method on 690 # @param picture [String, #to_s, nil] 691 # @param args [Array<Object>] see https://github.com/ffi/ffi/wiki/examples#using-varargs 692 # @return [Integer] 693 def self.brecv(self_p, picture, *args) 694 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 695 result = ::CZMQ::FFI.zsock_brecv(self_p, picture, *args) 696 result 697 end 698 699 # Return socket routing ID if any. This returns 0 if the socket is not 700 # of type ZMQ_SERVER or if no request was already received on it. 701 # 702 # @return [Integer] 703 def routing_id() 704 raise DestroyedError unless @ptr 705 self_p = @ptr 706 result = ::CZMQ::FFI.zsock_routing_id(self_p) 707 result 708 end 709 710 # Set routing ID on socket. The socket MUST be of type ZMQ_SERVER. 711 # This will be used when sending messages on the socket via the zsock API. 712 # 713 # @param routing_id [Integer, #to_int, #to_i] 714 # @return [void] 715 def set_routing_id(routing_id) 716 raise DestroyedError unless @ptr 717 self_p = @ptr 718 routing_id = Integer(routing_id) 719 result = ::CZMQ::FFI.zsock_set_routing_id(self_p, routing_id) 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 # @return [void] 728 def set_unbounded() 729 raise DestroyedError unless @ptr 730 self_p = @ptr 731 result = ::CZMQ::FFI.zsock_set_unbounded(self_p) 732 result 733 end 734 735 # Set socket to use unbounded pipes (HWM=0); use this in cases when you are 736 # totally certain the message volume can fit in memory. This method works 737 # across all versions of ZeroMQ. Takes a polymorphic socket reference. 738 # 739 # This is the polymorphic version of #set_unbounded. 740 # 741 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 742 # object reference to use this method on 743 # @return [void] 744 def self.set_unbounded(self_p) 745 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 746 result = ::CZMQ::FFI.zsock_set_unbounded(self_p) 747 result 748 end 749 750 # Send a signal over a socket. A signal is a short message carrying a 751 # success/failure code (by convention, 0 means OK). Signals are encoded 752 # to be distinguishable from "normal" messages. Accepts a zsock_t or a 753 # zactor_t argument, and returns 0 if successful, -1 if the signal could 754 # not be sent. Takes a polymorphic socket reference. 755 # 756 # @param status [Integer, #to_int, #to_i] 757 # @return [Integer] 758 def signal(status) 759 raise DestroyedError unless @ptr 760 self_p = @ptr 761 status = Integer(status) 762 result = ::CZMQ::FFI.zsock_signal(self_p, status) 763 result 764 end 765 766 # Send a signal over a socket. A signal is a short message carrying a 767 # success/failure code (by convention, 0 means OK). Signals are encoded 768 # to be distinguishable from "normal" messages. Accepts a zsock_t or a 769 # zactor_t argument, and returns 0 if successful, -1 if the signal could 770 # not be sent. Takes a polymorphic socket reference. 771 # 772 # This is the polymorphic version of #signal. 773 # 774 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 775 # object reference to use this method on 776 # @param status [Integer, #to_int, #to_i] 777 # @return [Integer] 778 def self.signal(self_p, status) 779 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 780 status = Integer(status) 781 result = ::CZMQ::FFI.zsock_signal(self_p, status) 782 result 783 end 784 785 # Wait on a signal. Use this to coordinate between threads, over pipe 786 # pairs. Blocks until the signal is received. Returns -1 on error, 0 or 787 # greater on success. Accepts a zsock_t or a zactor_t as argument. 788 # Takes a polymorphic socket reference. 789 # 790 # @return [Integer] 791 def wait() 792 raise DestroyedError unless @ptr 793 self_p = @ptr 794 result = ::CZMQ::FFI.zsock_wait(self_p) 795 result 796 end 797 798 # Wait on a signal. Use this to coordinate between threads, over pipe 799 # pairs. Blocks until the signal is received. Returns -1 on error, 0 or 800 # greater on success. Accepts a zsock_t or a zactor_t as argument. 801 # Takes a polymorphic socket reference. 802 # 803 # This is the polymorphic version of #wait. 804 # 805 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 806 # object reference to use this method on 807 # @return [Integer] 808 def self.wait(self_p) 809 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 810 result = ::CZMQ::FFI.zsock_wait(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 # @return [void] 819 def flush() 820 raise DestroyedError unless @ptr 821 self_p = @ptr 822 result = ::CZMQ::FFI.zsock_flush(self_p) 823 result 824 end 825 826 # If there is a partial message still waiting on the socket, remove and 827 # discard it. This is useful when reading partial messages, to get specific 828 # message types. 829 # 830 # This is the polymorphic version of #flush. 831 # 832 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 833 # object reference to use this method on 834 # @return [void] 835 def self.flush(self_p) 836 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 837 result = ::CZMQ::FFI.zsock_flush(self_p) 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 # @param group [String, #to_s, nil] 845 # @return [Integer] 846 def join(group) 847 raise DestroyedError unless @ptr 848 self_p = @ptr 849 result = ::CZMQ::FFI.zsock_join(self_p, group) 850 result 851 end 852 853 # Join a group for the RADIO-DISH pattern. Call only on ZMQ_DISH. 854 # Returns 0 if OK, -1 if failed. 855 # 856 # This is the polymorphic version of #join. 857 # 858 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 859 # object reference to use this method on 860 # @param group [String, #to_s, nil] 861 # @return [Integer] 862 def self.join(self_p, group) 863 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 864 result = ::CZMQ::FFI.zsock_join(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 # @param group [String, #to_s, nil] 872 # @return [Integer] 873 def leave(group) 874 raise DestroyedError unless @ptr 875 self_p = @ptr 876 result = ::CZMQ::FFI.zsock_leave(self_p, group) 877 result 878 end 879 880 # Leave a group for the RADIO-DISH pattern. Call only on ZMQ_DISH. 881 # Returns 0 if OK, -1 if failed. 882 # 883 # This is the polymorphic version of #leave. 884 # 885 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 886 # object reference to use this method on 887 # @param group [String, #to_s, nil] 888 # @return [Integer] 889 def self.leave(self_p, group) 890 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 891 result = ::CZMQ::FFI.zsock_leave(self_p, group) 892 result 893 end 894 895 # Probe the supplied object, and report if it looks like a zsock_t. 896 # Takes a polymorphic socket reference. 897 # 898 # @param self_ [::FFI::Pointer, #to_ptr] 899 # @return [Boolean] 900 def self.is(self_) 901 result = ::CZMQ::FFI.zsock_is(self_) 902 result 903 end 904 905 # Probe the supplied reference. If it looks like a zsock_t instance, return 906 # the underlying libzmq socket handle; else if it looks like a file 907 # descriptor, return NULL; else if it looks like a libzmq socket handle, 908 # return the supplied value. Takes a polymorphic socket reference. 909 # 910 # @param self_ [::FFI::Pointer, #to_ptr] 911 # @return [::FFI::Pointer] 912 def self.resolve(self_) 913 result = ::CZMQ::FFI.zsock_resolve(self_) 914 result 915 end 916 917 # Get socket option `heartbeat_ivl`. 918 # Available from libzmq 4.2.0. 919 # 920 # @return [Integer] 921 def heartbeat_ivl() 922 raise DestroyedError unless @ptr 923 self_p = @ptr 924 result = ::CZMQ::FFI.zsock_heartbeat_ivl(self_p) 925 result 926 end 927 928 # Get socket option `heartbeat_ivl`. 929 # Available from libzmq 4.2.0. 930 # 931 # This is the polymorphic version of #heartbeat_ivl. 932 # 933 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 934 # object reference to use this method on 935 # @return [Integer] 936 def self.heartbeat_ivl(self_p) 937 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 938 result = ::CZMQ::FFI.zsock_heartbeat_ivl(self_p) 939 result 940 end 941 942 # Set socket option `heartbeat_ivl`. 943 # Available from libzmq 4.2.0. 944 # 945 # @param heartbeat_ivl [Integer, #to_int, #to_i] 946 # @return [void] 947 def set_heartbeat_ivl(heartbeat_ivl) 948 raise DestroyedError unless @ptr 949 self_p = @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 # Set socket option `heartbeat_ivl`. 956 # Available from libzmq 4.2.0. 957 # 958 # This is the polymorphic version of #set_heartbeat_ivl. 959 # 960 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 961 # object reference to use this method on 962 # @param heartbeat_ivl [Integer, #to_int, #to_i] 963 # @return [void] 964 def self.set_heartbeat_ivl(self_p, heartbeat_ivl) 965 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 966 heartbeat_ivl = Integer(heartbeat_ivl) 967 result = ::CZMQ::FFI.zsock_set_heartbeat_ivl(self_p, heartbeat_ivl) 968 result 969 end 970 971 # Get socket option `heartbeat_ttl`. 972 # Available from libzmq 4.2.0. 973 # 974 # @return [Integer] 975 def heartbeat_ttl() 976 raise DestroyedError unless @ptr 977 self_p = @ptr 978 result = ::CZMQ::FFI.zsock_heartbeat_ttl(self_p) 979 result 980 end 981 982 # Get socket option `heartbeat_ttl`. 983 # Available from libzmq 4.2.0. 984 # 985 # This is the polymorphic version of #heartbeat_ttl. 986 # 987 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 988 # object reference to use this method on 989 # @return [Integer] 990 def self.heartbeat_ttl(self_p) 991 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 992 result = ::CZMQ::FFI.zsock_heartbeat_ttl(self_p) 993 result 994 end 995 996 # Set socket option `heartbeat_ttl`. 997 # Available from libzmq 4.2.0. 998 # 999 # @param heartbeat_ttl [Integer, #to_int, #to_i] 1000 # @return [void] 1001 def set_heartbeat_ttl(heartbeat_ttl) 1002 raise DestroyedError unless @ptr 1003 self_p = @ptr 1004 heartbeat_ttl = Integer(heartbeat_ttl) 1005 result = ::CZMQ::FFI.zsock_set_heartbeat_ttl(self_p, heartbeat_ttl) 1006 result 1007 end 1008 1009 # Set socket option `heartbeat_ttl`. 1010 # Available from libzmq 4.2.0. 1011 # 1012 # This is the polymorphic version of #set_heartbeat_ttl. 1013 # 1014 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1015 # object reference to use this method on 1016 # @param heartbeat_ttl [Integer, #to_int, #to_i] 1017 # @return [void] 1018 def self.set_heartbeat_ttl(self_p, heartbeat_ttl) 1019 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1020 heartbeat_ttl = Integer(heartbeat_ttl) 1021 result = ::CZMQ::FFI.zsock_set_heartbeat_ttl(self_p, heartbeat_ttl) 1022 result 1023 end 1024 1025 # Get socket option `heartbeat_timeout`. 1026 # Available from libzmq 4.2.0. 1027 # 1028 # @return [Integer] 1029 def heartbeat_timeout() 1030 raise DestroyedError unless @ptr 1031 self_p = @ptr 1032 result = ::CZMQ::FFI.zsock_heartbeat_timeout(self_p) 1033 result 1034 end 1035 1036 # Get socket option `heartbeat_timeout`. 1037 # Available from libzmq 4.2.0. 1038 # 1039 # This is the polymorphic version of #heartbeat_timeout. 1040 # 1041 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1042 # object reference to use this method on 1043 # @return [Integer] 1044 def self.heartbeat_timeout(self_p) 1045 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1046 result = ::CZMQ::FFI.zsock_heartbeat_timeout(self_p) 1047 result 1048 end 1049 1050 # Set socket option `heartbeat_timeout`. 1051 # Available from libzmq 4.2.0. 1052 # 1053 # @param heartbeat_timeout [Integer, #to_int, #to_i] 1054 # @return [void] 1055 def set_heartbeat_timeout(heartbeat_timeout) 1056 raise DestroyedError unless @ptr 1057 self_p = @ptr 1058 heartbeat_timeout = Integer(heartbeat_timeout) 1059 result = ::CZMQ::FFI.zsock_set_heartbeat_timeout(self_p, heartbeat_timeout) 1060 result 1061 end 1062 1063 # Set socket option `heartbeat_timeout`. 1064 # Available from libzmq 4.2.0. 1065 # 1066 # This is the polymorphic version of #set_heartbeat_timeout. 1067 # 1068 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1069 # object reference to use this method on 1070 # @param heartbeat_timeout [Integer, #to_int, #to_i] 1071 # @return [void] 1072 def self.set_heartbeat_timeout(self_p, heartbeat_timeout) 1073 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1074 heartbeat_timeout = Integer(heartbeat_timeout) 1075 result = ::CZMQ::FFI.zsock_set_heartbeat_timeout(self_p, heartbeat_timeout) 1076 result 1077 end 1078 1079 # Get socket option `use_fd`. 1080 # Available from libzmq 4.2.0. 1081 # 1082 # @return [Integer] 1083 def use_fd() 1084 raise DestroyedError unless @ptr 1085 self_p = @ptr 1086 result = ::CZMQ::FFI.zsock_use_fd(self_p) 1087 result 1088 end 1089 1090 # Get socket option `use_fd`. 1091 # Available from libzmq 4.2.0. 1092 # 1093 # This is the polymorphic version of #use_fd. 1094 # 1095 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1096 # object reference to use this method on 1097 # @return [Integer] 1098 def self.use_fd(self_p) 1099 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1100 result = ::CZMQ::FFI.zsock_use_fd(self_p) 1101 result 1102 end 1103 1104 # Set socket option `use_fd`. 1105 # Available from libzmq 4.2.0. 1106 # 1107 # @param use_fd [Integer, #to_int, #to_i] 1108 # @return [void] 1109 def set_use_fd(use_fd) 1110 raise DestroyedError unless @ptr 1111 self_p = @ptr 1112 use_fd = Integer(use_fd) 1113 result = ::CZMQ::FFI.zsock_set_use_fd(self_p, use_fd) 1114 result 1115 end 1116 1117 # Set socket option `use_fd`. 1118 # Available from libzmq 4.2.0. 1119 # 1120 # This is the polymorphic version of #set_use_fd. 1121 # 1122 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1123 # object reference to use this method on 1124 # @param use_fd [Integer, #to_int, #to_i] 1125 # @return [void] 1126 def self.set_use_fd(self_p, use_fd) 1127 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1128 use_fd = Integer(use_fd) 1129 result = ::CZMQ::FFI.zsock_set_use_fd(self_p, use_fd) 1130 result 1131 end 1132 1133 # Set socket option `xpub_manual`. 1134 # Available from libzmq 4.2.0. 1135 # 1136 # @param xpub_manual [Integer, #to_int, #to_i] 1137 # @return [void] 1138 def set_xpub_manual(xpub_manual) 1139 raise DestroyedError unless @ptr 1140 self_p = @ptr 1141 xpub_manual = Integer(xpub_manual) 1142 result = ::CZMQ::FFI.zsock_set_xpub_manual(self_p, xpub_manual) 1143 result 1144 end 1145 1146 # Set socket option `xpub_manual`. 1147 # Available from libzmq 4.2.0. 1148 # 1149 # This is the polymorphic version of #set_xpub_manual. 1150 # 1151 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1152 # object reference to use this method on 1153 # @param xpub_manual [Integer, #to_int, #to_i] 1154 # @return [void] 1155 def self.set_xpub_manual(self_p, xpub_manual) 1156 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1157 xpub_manual = Integer(xpub_manual) 1158 result = ::CZMQ::FFI.zsock_set_xpub_manual(self_p, xpub_manual) 1159 result 1160 end 1161 1162 # Set socket option `xpub_welcome_msg`. 1163 # Available from libzmq 4.2.0. 1164 # 1165 # @param xpub_welcome_msg [String, #to_s, nil] 1166 # @return [void] 1167 def set_xpub_welcome_msg(xpub_welcome_msg) 1168 raise DestroyedError unless @ptr 1169 self_p = @ptr 1170 result = ::CZMQ::FFI.zsock_set_xpub_welcome_msg(self_p, xpub_welcome_msg) 1171 result 1172 end 1173 1174 # Set socket option `xpub_welcome_msg`. 1175 # Available from libzmq 4.2.0. 1176 # 1177 # This is the polymorphic version of #set_xpub_welcome_msg. 1178 # 1179 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1180 # object reference to use this method on 1181 # @param xpub_welcome_msg [String, #to_s, nil] 1182 # @return [void] 1183 def self.set_xpub_welcome_msg(self_p, xpub_welcome_msg) 1184 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1185 result = ::CZMQ::FFI.zsock_set_xpub_welcome_msg(self_p, xpub_welcome_msg) 1186 result 1187 end 1188 1189 # Set socket option `stream_notify`. 1190 # Available from libzmq 4.2.0. 1191 # 1192 # @param stream_notify [Integer, #to_int, #to_i] 1193 # @return [void] 1194 def set_stream_notify(stream_notify) 1195 raise DestroyedError unless @ptr 1196 self_p = @ptr 1197 stream_notify = Integer(stream_notify) 1198 result = ::CZMQ::FFI.zsock_set_stream_notify(self_p, stream_notify) 1199 result 1200 end 1201 1202 # Set socket option `stream_notify`. 1203 # Available from libzmq 4.2.0. 1204 # 1205 # This is the polymorphic version of #set_stream_notify. 1206 # 1207 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1208 # object reference to use this method on 1209 # @param stream_notify [Integer, #to_int, #to_i] 1210 # @return [void] 1211 def self.set_stream_notify(self_p, stream_notify) 1212 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1213 stream_notify = Integer(stream_notify) 1214 result = ::CZMQ::FFI.zsock_set_stream_notify(self_p, stream_notify) 1215 result 1216 end 1217 1218 # Get socket option `invert_matching`. 1219 # Available from libzmq 4.2.0. 1220 # 1221 # @return [Integer] 1222 def invert_matching() 1223 raise DestroyedError unless @ptr 1224 self_p = @ptr 1225 result = ::CZMQ::FFI.zsock_invert_matching(self_p) 1226 result 1227 end 1228 1229 # Get socket option `invert_matching`. 1230 # Available from libzmq 4.2.0. 1231 # 1232 # This is the polymorphic version of #invert_matching. 1233 # 1234 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1235 # object reference to use this method on 1236 # @return [Integer] 1237 def self.invert_matching(self_p) 1238 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1239 result = ::CZMQ::FFI.zsock_invert_matching(self_p) 1240 result 1241 end 1242 1243 # Set socket option `invert_matching`. 1244 # Available from libzmq 4.2.0. 1245 # 1246 # @param invert_matching [Integer, #to_int, #to_i] 1247 # @return [void] 1248 def set_invert_matching(invert_matching) 1249 raise DestroyedError unless @ptr 1250 self_p = @ptr 1251 invert_matching = Integer(invert_matching) 1252 result = ::CZMQ::FFI.zsock_set_invert_matching(self_p, invert_matching) 1253 result 1254 end 1255 1256 # Set socket option `invert_matching`. 1257 # Available from libzmq 4.2.0. 1258 # 1259 # This is the polymorphic version of #set_invert_matching. 1260 # 1261 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1262 # object reference to use this method on 1263 # @param invert_matching [Integer, #to_int, #to_i] 1264 # @return [void] 1265 def self.set_invert_matching(self_p, invert_matching) 1266 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1267 invert_matching = Integer(invert_matching) 1268 result = ::CZMQ::FFI.zsock_set_invert_matching(self_p, invert_matching) 1269 result 1270 end 1271 1272 # Set socket option `xpub_verboser`. 1273 # Available from libzmq 4.2.0. 1274 # 1275 # @param xpub_verboser [Integer, #to_int, #to_i] 1276 # @return [void] 1277 def set_xpub_verboser(xpub_verboser) 1278 raise DestroyedError unless @ptr 1279 self_p = @ptr 1280 xpub_verboser = Integer(xpub_verboser) 1281 result = ::CZMQ::FFI.zsock_set_xpub_verboser(self_p, xpub_verboser) 1282 result 1283 end 1284 1285 # Set socket option `xpub_verboser`. 1286 # Available from libzmq 4.2.0. 1287 # 1288 # This is the polymorphic version of #set_xpub_verboser. 1289 # 1290 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1291 # object reference to use this method on 1292 # @param xpub_verboser [Integer, #to_int, #to_i] 1293 # @return [void] 1294 def self.set_xpub_verboser(self_p, xpub_verboser) 1295 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1296 xpub_verboser = Integer(xpub_verboser) 1297 result = ::CZMQ::FFI.zsock_set_xpub_verboser(self_p, xpub_verboser) 1298 result 1299 end 1300 1301 # Get socket option `connect_timeout`. 1302 # Available from libzmq 4.2.0. 1303 # 1304 # @return [Integer] 1305 def connect_timeout() 1306 raise DestroyedError unless @ptr 1307 self_p = @ptr 1308 result = ::CZMQ::FFI.zsock_connect_timeout(self_p) 1309 result 1310 end 1311 1312 # Get socket option `connect_timeout`. 1313 # Available from libzmq 4.2.0. 1314 # 1315 # This is the polymorphic version of #connect_timeout. 1316 # 1317 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1318 # object reference to use this method on 1319 # @return [Integer] 1320 def self.connect_timeout(self_p) 1321 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1322 result = ::CZMQ::FFI.zsock_connect_timeout(self_p) 1323 result 1324 end 1325 1326 # Set socket option `connect_timeout`. 1327 # Available from libzmq 4.2.0. 1328 # 1329 # @param connect_timeout [Integer, #to_int, #to_i] 1330 # @return [void] 1331 def set_connect_timeout(connect_timeout) 1332 raise DestroyedError unless @ptr 1333 self_p = @ptr 1334 connect_timeout = Integer(connect_timeout) 1335 result = ::CZMQ::FFI.zsock_set_connect_timeout(self_p, connect_timeout) 1336 result 1337 end 1338 1339 # Set socket option `connect_timeout`. 1340 # Available from libzmq 4.2.0. 1341 # 1342 # This is the polymorphic version of #set_connect_timeout. 1343 # 1344 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1345 # object reference to use this method on 1346 # @param connect_timeout [Integer, #to_int, #to_i] 1347 # @return [void] 1348 def self.set_connect_timeout(self_p, connect_timeout) 1349 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1350 connect_timeout = Integer(connect_timeout) 1351 result = ::CZMQ::FFI.zsock_set_connect_timeout(self_p, connect_timeout) 1352 result 1353 end 1354 1355 # Get socket option `tcp_maxrt`. 1356 # Available from libzmq 4.2.0. 1357 # 1358 # @return [Integer] 1359 def tcp_maxrt() 1360 raise DestroyedError unless @ptr 1361 self_p = @ptr 1362 result = ::CZMQ::FFI.zsock_tcp_maxrt(self_p) 1363 result 1364 end 1365 1366 # Get socket option `tcp_maxrt`. 1367 # Available from libzmq 4.2.0. 1368 # 1369 # This is the polymorphic version of #tcp_maxrt. 1370 # 1371 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1372 # object reference to use this method on 1373 # @return [Integer] 1374 def self.tcp_maxrt(self_p) 1375 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1376 result = ::CZMQ::FFI.zsock_tcp_maxrt(self_p) 1377 result 1378 end 1379 1380 # Set socket option `tcp_maxrt`. 1381 # Available from libzmq 4.2.0. 1382 # 1383 # @param tcp_maxrt [Integer, #to_int, #to_i] 1384 # @return [void] 1385 def set_tcp_maxrt(tcp_maxrt) 1386 raise DestroyedError unless @ptr 1387 self_p = @ptr 1388 tcp_maxrt = Integer(tcp_maxrt) 1389 result = ::CZMQ::FFI.zsock_set_tcp_maxrt(self_p, tcp_maxrt) 1390 result 1391 end 1392 1393 # Set socket option `tcp_maxrt`. 1394 # Available from libzmq 4.2.0. 1395 # 1396 # This is the polymorphic version of #set_tcp_maxrt. 1397 # 1398 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1399 # object reference to use this method on 1400 # @param tcp_maxrt [Integer, #to_int, #to_i] 1401 # @return [void] 1402 def self.set_tcp_maxrt(self_p, tcp_maxrt) 1403 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1404 tcp_maxrt = Integer(tcp_maxrt) 1405 result = ::CZMQ::FFI.zsock_set_tcp_maxrt(self_p, tcp_maxrt) 1406 result 1407 end 1408 1409 # Get socket option `thread_safe`. 1410 # Available from libzmq 4.2.0. 1411 # 1412 # @return [Integer] 1413 def thread_safe() 1414 raise DestroyedError unless @ptr 1415 self_p = @ptr 1416 result = ::CZMQ::FFI.zsock_thread_safe(self_p) 1417 result 1418 end 1419 1420 # Get socket option `thread_safe`. 1421 # Available from libzmq 4.2.0. 1422 # 1423 # This is the polymorphic version of #thread_safe. 1424 # 1425 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1426 # object reference to use this method on 1427 # @return [Integer] 1428 def self.thread_safe(self_p) 1429 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1430 result = ::CZMQ::FFI.zsock_thread_safe(self_p) 1431 result 1432 end 1433 1434 # Get socket option `multicast_maxtpdu`. 1435 # Available from libzmq 4.2.0. 1436 # 1437 # @return [Integer] 1438 def multicast_maxtpdu() 1439 raise DestroyedError unless @ptr 1440 self_p = @ptr 1441 result = ::CZMQ::FFI.zsock_multicast_maxtpdu(self_p) 1442 result 1443 end 1444 1445 # Get socket option `multicast_maxtpdu`. 1446 # Available from libzmq 4.2.0. 1447 # 1448 # This is the polymorphic version of #multicast_maxtpdu. 1449 # 1450 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1451 # object reference to use this method on 1452 # @return [Integer] 1453 def self.multicast_maxtpdu(self_p) 1454 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1455 result = ::CZMQ::FFI.zsock_multicast_maxtpdu(self_p) 1456 result 1457 end 1458 1459 # Set socket option `multicast_maxtpdu`. 1460 # Available from libzmq 4.2.0. 1461 # 1462 # @param multicast_maxtpdu [Integer, #to_int, #to_i] 1463 # @return [void] 1464 def set_multicast_maxtpdu(multicast_maxtpdu) 1465 raise DestroyedError unless @ptr 1466 self_p = @ptr 1467 multicast_maxtpdu = Integer(multicast_maxtpdu) 1468 result = ::CZMQ::FFI.zsock_set_multicast_maxtpdu(self_p, multicast_maxtpdu) 1469 result 1470 end 1471 1472 # Set socket option `multicast_maxtpdu`. 1473 # Available from libzmq 4.2.0. 1474 # 1475 # This is the polymorphic version of #set_multicast_maxtpdu. 1476 # 1477 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1478 # object reference to use this method on 1479 # @param multicast_maxtpdu [Integer, #to_int, #to_i] 1480 # @return [void] 1481 def self.set_multicast_maxtpdu(self_p, multicast_maxtpdu) 1482 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1483 multicast_maxtpdu = Integer(multicast_maxtpdu) 1484 result = ::CZMQ::FFI.zsock_set_multicast_maxtpdu(self_p, multicast_maxtpdu) 1485 result 1486 end 1487 1488 # Get socket option `vmci_buffer_size`. 1489 # Available from libzmq 4.2.0. 1490 # 1491 # @return [Integer] 1492 def vmci_buffer_size() 1493 raise DestroyedError unless @ptr 1494 self_p = @ptr 1495 result = ::CZMQ::FFI.zsock_vmci_buffer_size(self_p) 1496 result 1497 end 1498 1499 # Get socket option `vmci_buffer_size`. 1500 # Available from libzmq 4.2.0. 1501 # 1502 # This is the polymorphic version of #vmci_buffer_size. 1503 # 1504 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1505 # object reference to use this method on 1506 # @return [Integer] 1507 def self.vmci_buffer_size(self_p) 1508 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1509 result = ::CZMQ::FFI.zsock_vmci_buffer_size(self_p) 1510 result 1511 end 1512 1513 # Set socket option `vmci_buffer_size`. 1514 # Available from libzmq 4.2.0. 1515 # 1516 # @param vmci_buffer_size [Integer, #to_int, #to_i] 1517 # @return [void] 1518 def set_vmci_buffer_size(vmci_buffer_size) 1519 raise DestroyedError unless @ptr 1520 self_p = @ptr 1521 vmci_buffer_size = Integer(vmci_buffer_size) 1522 result = ::CZMQ::FFI.zsock_set_vmci_buffer_size(self_p, vmci_buffer_size) 1523 result 1524 end 1525 1526 # Set socket option `vmci_buffer_size`. 1527 # Available from libzmq 4.2.0. 1528 # 1529 # This is the polymorphic version of #set_vmci_buffer_size. 1530 # 1531 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1532 # object reference to use this method on 1533 # @param vmci_buffer_size [Integer, #to_int, #to_i] 1534 # @return [void] 1535 def self.set_vmci_buffer_size(self_p, vmci_buffer_size) 1536 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1537 vmci_buffer_size = Integer(vmci_buffer_size) 1538 result = ::CZMQ::FFI.zsock_set_vmci_buffer_size(self_p, vmci_buffer_size) 1539 result 1540 end 1541 1542 # Get socket option `vmci_buffer_min_size`. 1543 # Available from libzmq 4.2.0. 1544 # 1545 # @return [Integer] 1546 def vmci_buffer_min_size() 1547 raise DestroyedError unless @ptr 1548 self_p = @ptr 1549 result = ::CZMQ::FFI.zsock_vmci_buffer_min_size(self_p) 1550 result 1551 end 1552 1553 # Get socket option `vmci_buffer_min_size`. 1554 # Available from libzmq 4.2.0. 1555 # 1556 # This is the polymorphic version of #vmci_buffer_min_size. 1557 # 1558 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1559 # object reference to use this method on 1560 # @return [Integer] 1561 def self.vmci_buffer_min_size(self_p) 1562 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1563 result = ::CZMQ::FFI.zsock_vmci_buffer_min_size(self_p) 1564 result 1565 end 1566 1567 # Set socket option `vmci_buffer_min_size`. 1568 # Available from libzmq 4.2.0. 1569 # 1570 # @param vmci_buffer_min_size [Integer, #to_int, #to_i] 1571 # @return [void] 1572 def set_vmci_buffer_min_size(vmci_buffer_min_size) 1573 raise DestroyedError unless @ptr 1574 self_p = @ptr 1575 vmci_buffer_min_size = Integer(vmci_buffer_min_size) 1576 result = ::CZMQ::FFI.zsock_set_vmci_buffer_min_size(self_p, vmci_buffer_min_size) 1577 result 1578 end 1579 1580 # Set socket option `vmci_buffer_min_size`. 1581 # Available from libzmq 4.2.0. 1582 # 1583 # This is the polymorphic version of #set_vmci_buffer_min_size. 1584 # 1585 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1586 # object reference to use this method on 1587 # @param vmci_buffer_min_size [Integer, #to_int, #to_i] 1588 # @return [void] 1589 def self.set_vmci_buffer_min_size(self_p, vmci_buffer_min_size) 1590 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1591 vmci_buffer_min_size = Integer(vmci_buffer_min_size) 1592 result = ::CZMQ::FFI.zsock_set_vmci_buffer_min_size(self_p, vmci_buffer_min_size) 1593 result 1594 end 1595 1596 # Get socket option `vmci_buffer_max_size`. 1597 # Available from libzmq 4.2.0. 1598 # 1599 # @return [Integer] 1600 def vmci_buffer_max_size() 1601 raise DestroyedError unless @ptr 1602 self_p = @ptr 1603 result = ::CZMQ::FFI.zsock_vmci_buffer_max_size(self_p) 1604 result 1605 end 1606 1607 # Get socket option `vmci_buffer_max_size`. 1608 # Available from libzmq 4.2.0. 1609 # 1610 # This is the polymorphic version of #vmci_buffer_max_size. 1611 # 1612 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1613 # object reference to use this method on 1614 # @return [Integer] 1615 def self.vmci_buffer_max_size(self_p) 1616 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1617 result = ::CZMQ::FFI.zsock_vmci_buffer_max_size(self_p) 1618 result 1619 end 1620 1621 # Set socket option `vmci_buffer_max_size`. 1622 # Available from libzmq 4.2.0. 1623 # 1624 # @param vmci_buffer_max_size [Integer, #to_int, #to_i] 1625 # @return [void] 1626 def set_vmci_buffer_max_size(vmci_buffer_max_size) 1627 raise DestroyedError unless @ptr 1628 self_p = @ptr 1629 vmci_buffer_max_size = Integer(vmci_buffer_max_size) 1630 result = ::CZMQ::FFI.zsock_set_vmci_buffer_max_size(self_p, vmci_buffer_max_size) 1631 result 1632 end 1633 1634 # Set socket option `vmci_buffer_max_size`. 1635 # Available from libzmq 4.2.0. 1636 # 1637 # This is the polymorphic version of #set_vmci_buffer_max_size. 1638 # 1639 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1640 # object reference to use this method on 1641 # @param vmci_buffer_max_size [Integer, #to_int, #to_i] 1642 # @return [void] 1643 def self.set_vmci_buffer_max_size(self_p, vmci_buffer_max_size) 1644 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1645 vmci_buffer_max_size = Integer(vmci_buffer_max_size) 1646 result = ::CZMQ::FFI.zsock_set_vmci_buffer_max_size(self_p, vmci_buffer_max_size) 1647 result 1648 end 1649 1650 # Get socket option `vmci_connect_timeout`. 1651 # Available from libzmq 4.2.0. 1652 # 1653 # @return [Integer] 1654 def vmci_connect_timeout() 1655 raise DestroyedError unless @ptr 1656 self_p = @ptr 1657 result = ::CZMQ::FFI.zsock_vmci_connect_timeout(self_p) 1658 result 1659 end 1660 1661 # Get socket option `vmci_connect_timeout`. 1662 # Available from libzmq 4.2.0. 1663 # 1664 # This is the polymorphic version of #vmci_connect_timeout. 1665 # 1666 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1667 # object reference to use this method on 1668 # @return [Integer] 1669 def self.vmci_connect_timeout(self_p) 1670 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1671 result = ::CZMQ::FFI.zsock_vmci_connect_timeout(self_p) 1672 result 1673 end 1674 1675 # Set socket option `vmci_connect_timeout`. 1676 # Available from libzmq 4.2.0. 1677 # 1678 # @param vmci_connect_timeout [Integer, #to_int, #to_i] 1679 # @return [void] 1680 def set_vmci_connect_timeout(vmci_connect_timeout) 1681 raise DestroyedError unless @ptr 1682 self_p = @ptr 1683 vmci_connect_timeout = Integer(vmci_connect_timeout) 1684 result = ::CZMQ::FFI.zsock_set_vmci_connect_timeout(self_p, vmci_connect_timeout) 1685 result 1686 end 1687 1688 # Set socket option `vmci_connect_timeout`. 1689 # Available from libzmq 4.2.0. 1690 # 1691 # This is the polymorphic version of #set_vmci_connect_timeout. 1692 # 1693 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1694 # object reference to use this method on 1695 # @param vmci_connect_timeout [Integer, #to_int, #to_i] 1696 # @return [void] 1697 def self.set_vmci_connect_timeout(self_p, vmci_connect_timeout) 1698 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1699 vmci_connect_timeout = Integer(vmci_connect_timeout) 1700 result = ::CZMQ::FFI.zsock_set_vmci_connect_timeout(self_p, vmci_connect_timeout) 1701 result 1702 end 1703 1704 # Get socket option `tos`. 1705 # Available from libzmq 4.1.0. 1706 # 1707 # @return [Integer] 1708 def tos() 1709 raise DestroyedError unless @ptr 1710 self_p = @ptr 1711 result = ::CZMQ::FFI.zsock_tos(self_p) 1712 result 1713 end 1714 1715 # Get socket option `tos`. 1716 # Available from libzmq 4.1.0. 1717 # 1718 # This is the polymorphic version of #tos. 1719 # 1720 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1721 # object reference to use this method on 1722 # @return [Integer] 1723 def self.tos(self_p) 1724 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1725 result = ::CZMQ::FFI.zsock_tos(self_p) 1726 result 1727 end 1728 1729 # Set socket option `tos`. 1730 # Available from libzmq 4.1.0. 1731 # 1732 # @param tos [Integer, #to_int, #to_i] 1733 # @return [void] 1734 def set_tos(tos) 1735 raise DestroyedError unless @ptr 1736 self_p = @ptr 1737 tos = Integer(tos) 1738 result = ::CZMQ::FFI.zsock_set_tos(self_p, tos) 1739 result 1740 end 1741 1742 # Set socket option `tos`. 1743 # Available from libzmq 4.1.0. 1744 # 1745 # This is the polymorphic version of #set_tos. 1746 # 1747 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1748 # object reference to use this method on 1749 # @param tos [Integer, #to_int, #to_i] 1750 # @return [void] 1751 def self.set_tos(self_p, tos) 1752 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1753 tos = Integer(tos) 1754 result = ::CZMQ::FFI.zsock_set_tos(self_p, tos) 1755 result 1756 end 1757 1758 # Set socket option `router_handover`. 1759 # Available from libzmq 4.1.0. 1760 # 1761 # @param router_handover [Integer, #to_int, #to_i] 1762 # @return [void] 1763 def set_router_handover(router_handover) 1764 raise DestroyedError unless @ptr 1765 self_p = @ptr 1766 router_handover = Integer(router_handover) 1767 result = ::CZMQ::FFI.zsock_set_router_handover(self_p, router_handover) 1768 result 1769 end 1770 1771 # Set socket option `router_handover`. 1772 # Available from libzmq 4.1.0. 1773 # 1774 # This is the polymorphic version of #set_router_handover. 1775 # 1776 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1777 # object reference to use this method on 1778 # @param router_handover [Integer, #to_int, #to_i] 1779 # @return [void] 1780 def self.set_router_handover(self_p, router_handover) 1781 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1782 router_handover = Integer(router_handover) 1783 result = ::CZMQ::FFI.zsock_set_router_handover(self_p, router_handover) 1784 result 1785 end 1786 1787 # Set socket option `connect_rid`. 1788 # Available from libzmq 4.1.0. 1789 # 1790 # @param connect_rid [String, #to_s, nil] 1791 # @return [void] 1792 def set_connect_rid(connect_rid) 1793 raise DestroyedError unless @ptr 1794 self_p = @ptr 1795 result = ::CZMQ::FFI.zsock_set_connect_rid(self_p, connect_rid) 1796 result 1797 end 1798 1799 # Set socket option `connect_rid`. 1800 # Available from libzmq 4.1.0. 1801 # 1802 # This is the polymorphic version of #set_connect_rid. 1803 # 1804 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1805 # object reference to use this method on 1806 # @param connect_rid [String, #to_s, nil] 1807 # @return [void] 1808 def self.set_connect_rid(self_p, connect_rid) 1809 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1810 result = ::CZMQ::FFI.zsock_set_connect_rid(self_p, connect_rid) 1811 result 1812 end 1813 1814 # Set socket option `connect_rid` from 32-octet binary 1815 # Available from libzmq 4.1.0. 1816 # 1817 # @param connect_rid [::FFI::Pointer, #to_ptr] 1818 # @return [void] 1819 def set_connect_rid_bin(connect_rid) 1820 raise DestroyedError unless @ptr 1821 self_p = @ptr 1822 result = ::CZMQ::FFI.zsock_set_connect_rid_bin(self_p, connect_rid) 1823 result 1824 end 1825 1826 # Set socket option `connect_rid` from 32-octet binary 1827 # Available from libzmq 4.1.0. 1828 # 1829 # This is the polymorphic version of #set_connect_rid_bin. 1830 # 1831 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1832 # object reference to use this method on 1833 # @param connect_rid [::FFI::Pointer, #to_ptr] 1834 # @return [void] 1835 def self.set_connect_rid_bin(self_p, connect_rid) 1836 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1837 result = ::CZMQ::FFI.zsock_set_connect_rid_bin(self_p, connect_rid) 1838 result 1839 end 1840 1841 # Get socket option `handshake_ivl`. 1842 # Available from libzmq 4.1.0. 1843 # 1844 # @return [Integer] 1845 def handshake_ivl() 1846 raise DestroyedError unless @ptr 1847 self_p = @ptr 1848 result = ::CZMQ::FFI.zsock_handshake_ivl(self_p) 1849 result 1850 end 1851 1852 # Get socket option `handshake_ivl`. 1853 # Available from libzmq 4.1.0. 1854 # 1855 # This is the polymorphic version of #handshake_ivl. 1856 # 1857 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1858 # object reference to use this method on 1859 # @return [Integer] 1860 def self.handshake_ivl(self_p) 1861 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1862 result = ::CZMQ::FFI.zsock_handshake_ivl(self_p) 1863 result 1864 end 1865 1866 # Set socket option `handshake_ivl`. 1867 # Available from libzmq 4.1.0. 1868 # 1869 # @param handshake_ivl [Integer, #to_int, #to_i] 1870 # @return [void] 1871 def set_handshake_ivl(handshake_ivl) 1872 raise DestroyedError unless @ptr 1873 self_p = @ptr 1874 handshake_ivl = Integer(handshake_ivl) 1875 result = ::CZMQ::FFI.zsock_set_handshake_ivl(self_p, handshake_ivl) 1876 result 1877 end 1878 1879 # Set socket option `handshake_ivl`. 1880 # Available from libzmq 4.1.0. 1881 # 1882 # This is the polymorphic version of #set_handshake_ivl. 1883 # 1884 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1885 # object reference to use this method on 1886 # @param handshake_ivl [Integer, #to_int, #to_i] 1887 # @return [void] 1888 def self.set_handshake_ivl(self_p, handshake_ivl) 1889 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1890 handshake_ivl = Integer(handshake_ivl) 1891 result = ::CZMQ::FFI.zsock_set_handshake_ivl(self_p, handshake_ivl) 1892 result 1893 end 1894 1895 # Get socket option `socks_proxy`. 1896 # Available from libzmq 4.1.0. 1897 # 1898 # @return [::FFI::AutoPointer] 1899 def socks_proxy() 1900 raise DestroyedError unless @ptr 1901 self_p = @ptr 1902 result = ::CZMQ::FFI.zsock_socks_proxy(self_p) 1903 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 1904 result 1905 end 1906 1907 # Get socket option `socks_proxy`. 1908 # Available from libzmq 4.1.0. 1909 # 1910 # This is the polymorphic version of #socks_proxy. 1911 # 1912 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1913 # object reference to use this method on 1914 # @return [::FFI::AutoPointer] 1915 def self.socks_proxy(self_p) 1916 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1917 result = ::CZMQ::FFI.zsock_socks_proxy(self_p) 1918 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 1919 result 1920 end 1921 1922 # Set socket option `socks_proxy`. 1923 # Available from libzmq 4.1.0. 1924 # 1925 # @param socks_proxy [String, #to_s, nil] 1926 # @return [void] 1927 def set_socks_proxy(socks_proxy) 1928 raise DestroyedError unless @ptr 1929 self_p = @ptr 1930 result = ::CZMQ::FFI.zsock_set_socks_proxy(self_p, socks_proxy) 1931 result 1932 end 1933 1934 # Set socket option `socks_proxy`. 1935 # Available from libzmq 4.1.0. 1936 # 1937 # This is the polymorphic version of #set_socks_proxy. 1938 # 1939 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1940 # object reference to use this method on 1941 # @param socks_proxy [String, #to_s, nil] 1942 # @return [void] 1943 def self.set_socks_proxy(self_p, socks_proxy) 1944 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1945 result = ::CZMQ::FFI.zsock_set_socks_proxy(self_p, socks_proxy) 1946 result 1947 end 1948 1949 # Set socket option `xpub_nodrop`. 1950 # Available from libzmq 4.1.0. 1951 # 1952 # @param xpub_nodrop [Integer, #to_int, #to_i] 1953 # @return [void] 1954 def set_xpub_nodrop(xpub_nodrop) 1955 raise DestroyedError unless @ptr 1956 self_p = @ptr 1957 xpub_nodrop = Integer(xpub_nodrop) 1958 result = ::CZMQ::FFI.zsock_set_xpub_nodrop(self_p, xpub_nodrop) 1959 result 1960 end 1961 1962 # Set socket option `xpub_nodrop`. 1963 # Available from libzmq 4.1.0. 1964 # 1965 # This is the polymorphic version of #set_xpub_nodrop. 1966 # 1967 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1968 # object reference to use this method on 1969 # @param xpub_nodrop [Integer, #to_int, #to_i] 1970 # @return [void] 1971 def self.set_xpub_nodrop(self_p, xpub_nodrop) 1972 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 1973 xpub_nodrop = Integer(xpub_nodrop) 1974 result = ::CZMQ::FFI.zsock_set_xpub_nodrop(self_p, xpub_nodrop) 1975 result 1976 end 1977 1978 # Set socket option `router_mandatory`. 1979 # Available from libzmq 4.0.0. 1980 # 1981 # @param router_mandatory [Integer, #to_int, #to_i] 1982 # @return [void] 1983 def set_router_mandatory(router_mandatory) 1984 raise DestroyedError unless @ptr 1985 self_p = @ptr 1986 router_mandatory = Integer(router_mandatory) 1987 result = ::CZMQ::FFI.zsock_set_router_mandatory(self_p, router_mandatory) 1988 result 1989 end 1990 1991 # Set socket option `router_mandatory`. 1992 # Available from libzmq 4.0.0. 1993 # 1994 # This is the polymorphic version of #set_router_mandatory. 1995 # 1996 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 1997 # object reference to use this method on 1998 # @param router_mandatory [Integer, #to_int, #to_i] 1999 # @return [void] 2000 def self.set_router_mandatory(self_p, router_mandatory) 2001 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2002 router_mandatory = Integer(router_mandatory) 2003 result = ::CZMQ::FFI.zsock_set_router_mandatory(self_p, router_mandatory) 2004 result 2005 end 2006 2007 # Set socket option `probe_router`. 2008 # Available from libzmq 4.0.0. 2009 # 2010 # @param probe_router [Integer, #to_int, #to_i] 2011 # @return [void] 2012 def set_probe_router(probe_router) 2013 raise DestroyedError unless @ptr 2014 self_p = @ptr 2015 probe_router = Integer(probe_router) 2016 result = ::CZMQ::FFI.zsock_set_probe_router(self_p, probe_router) 2017 result 2018 end 2019 2020 # Set socket option `probe_router`. 2021 # Available from libzmq 4.0.0. 2022 # 2023 # This is the polymorphic version of #set_probe_router. 2024 # 2025 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2026 # object reference to use this method on 2027 # @param probe_router [Integer, #to_int, #to_i] 2028 # @return [void] 2029 def self.set_probe_router(self_p, probe_router) 2030 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2031 probe_router = Integer(probe_router) 2032 result = ::CZMQ::FFI.zsock_set_probe_router(self_p, probe_router) 2033 result 2034 end 2035 2036 # Set socket option `req_relaxed`. 2037 # Available from libzmq 4.0.0. 2038 # 2039 # @param req_relaxed [Integer, #to_int, #to_i] 2040 # @return [void] 2041 def set_req_relaxed(req_relaxed) 2042 raise DestroyedError unless @ptr 2043 self_p = @ptr 2044 req_relaxed = Integer(req_relaxed) 2045 result = ::CZMQ::FFI.zsock_set_req_relaxed(self_p, req_relaxed) 2046 result 2047 end 2048 2049 # Set socket option `req_relaxed`. 2050 # Available from libzmq 4.0.0. 2051 # 2052 # This is the polymorphic version of #set_req_relaxed. 2053 # 2054 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2055 # object reference to use this method on 2056 # @param req_relaxed [Integer, #to_int, #to_i] 2057 # @return [void] 2058 def self.set_req_relaxed(self_p, req_relaxed) 2059 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2060 req_relaxed = Integer(req_relaxed) 2061 result = ::CZMQ::FFI.zsock_set_req_relaxed(self_p, req_relaxed) 2062 result 2063 end 2064 2065 # Set socket option `req_correlate`. 2066 # Available from libzmq 4.0.0. 2067 # 2068 # @param req_correlate [Integer, #to_int, #to_i] 2069 # @return [void] 2070 def set_req_correlate(req_correlate) 2071 raise DestroyedError unless @ptr 2072 self_p = @ptr 2073 req_correlate = Integer(req_correlate) 2074 result = ::CZMQ::FFI.zsock_set_req_correlate(self_p, req_correlate) 2075 result 2076 end 2077 2078 # Set socket option `req_correlate`. 2079 # Available from libzmq 4.0.0. 2080 # 2081 # This is the polymorphic version of #set_req_correlate. 2082 # 2083 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2084 # object reference to use this method on 2085 # @param req_correlate [Integer, #to_int, #to_i] 2086 # @return [void] 2087 def self.set_req_correlate(self_p, req_correlate) 2088 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2089 req_correlate = Integer(req_correlate) 2090 result = ::CZMQ::FFI.zsock_set_req_correlate(self_p, req_correlate) 2091 result 2092 end 2093 2094 # Set socket option `conflate`. 2095 # Available from libzmq 4.0.0. 2096 # 2097 # @param conflate [Integer, #to_int, #to_i] 2098 # @return [void] 2099 def set_conflate(conflate) 2100 raise DestroyedError unless @ptr 2101 self_p = @ptr 2102 conflate = Integer(conflate) 2103 result = ::CZMQ::FFI.zsock_set_conflate(self_p, conflate) 2104 result 2105 end 2106 2107 # Set socket option `conflate`. 2108 # Available from libzmq 4.0.0. 2109 # 2110 # This is the polymorphic version of #set_conflate. 2111 # 2112 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2113 # object reference to use this method on 2114 # @param conflate [Integer, #to_int, #to_i] 2115 # @return [void] 2116 def self.set_conflate(self_p, conflate) 2117 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2118 conflate = Integer(conflate) 2119 result = ::CZMQ::FFI.zsock_set_conflate(self_p, conflate) 2120 result 2121 end 2122 2123 # Get socket option `zap_domain`. 2124 # Available from libzmq 4.0.0. 2125 # 2126 # @return [::FFI::AutoPointer] 2127 def zap_domain() 2128 raise DestroyedError unless @ptr 2129 self_p = @ptr 2130 result = ::CZMQ::FFI.zsock_zap_domain(self_p) 2131 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 2132 result 2133 end 2134 2135 # Get socket option `zap_domain`. 2136 # Available from libzmq 4.0.0. 2137 # 2138 # This is the polymorphic version of #zap_domain. 2139 # 2140 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2141 # object reference to use this method on 2142 # @return [::FFI::AutoPointer] 2143 def self.zap_domain(self_p) 2144 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2145 result = ::CZMQ::FFI.zsock_zap_domain(self_p) 2146 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 2147 result 2148 end 2149 2150 # Set socket option `zap_domain`. 2151 # Available from libzmq 4.0.0. 2152 # 2153 # @param zap_domain [String, #to_s, nil] 2154 # @return [void] 2155 def set_zap_domain(zap_domain) 2156 raise DestroyedError unless @ptr 2157 self_p = @ptr 2158 result = ::CZMQ::FFI.zsock_set_zap_domain(self_p, zap_domain) 2159 result 2160 end 2161 2162 # Set socket option `zap_domain`. 2163 # Available from libzmq 4.0.0. 2164 # 2165 # This is the polymorphic version of #set_zap_domain. 2166 # 2167 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2168 # object reference to use this method on 2169 # @param zap_domain [String, #to_s, nil] 2170 # @return [void] 2171 def self.set_zap_domain(self_p, zap_domain) 2172 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2173 result = ::CZMQ::FFI.zsock_set_zap_domain(self_p, zap_domain) 2174 result 2175 end 2176 2177 # Get socket option `mechanism`. 2178 # Available from libzmq 4.0.0. 2179 # 2180 # @return [Integer] 2181 def mechanism() 2182 raise DestroyedError unless @ptr 2183 self_p = @ptr 2184 result = ::CZMQ::FFI.zsock_mechanism(self_p) 2185 result 2186 end 2187 2188 # Get socket option `mechanism`. 2189 # Available from libzmq 4.0.0. 2190 # 2191 # This is the polymorphic version of #mechanism. 2192 # 2193 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2194 # object reference to use this method on 2195 # @return [Integer] 2196 def self.mechanism(self_p) 2197 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2198 result = ::CZMQ::FFI.zsock_mechanism(self_p) 2199 result 2200 end 2201 2202 # Get socket option `plain_server`. 2203 # Available from libzmq 4.0.0. 2204 # 2205 # @return [Integer] 2206 def plain_server() 2207 raise DestroyedError unless @ptr 2208 self_p = @ptr 2209 result = ::CZMQ::FFI.zsock_plain_server(self_p) 2210 result 2211 end 2212 2213 # Get socket option `plain_server`. 2214 # Available from libzmq 4.0.0. 2215 # 2216 # This is the polymorphic version of #plain_server. 2217 # 2218 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2219 # object reference to use this method on 2220 # @return [Integer] 2221 def self.plain_server(self_p) 2222 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2223 result = ::CZMQ::FFI.zsock_plain_server(self_p) 2224 result 2225 end 2226 2227 # Set socket option `plain_server`. 2228 # Available from libzmq 4.0.0. 2229 # 2230 # @param plain_server [Integer, #to_int, #to_i] 2231 # @return [void] 2232 def set_plain_server(plain_server) 2233 raise DestroyedError unless @ptr 2234 self_p = @ptr 2235 plain_server = Integer(plain_server) 2236 result = ::CZMQ::FFI.zsock_set_plain_server(self_p, plain_server) 2237 result 2238 end 2239 2240 # Set socket option `plain_server`. 2241 # Available from libzmq 4.0.0. 2242 # 2243 # This is the polymorphic version of #set_plain_server. 2244 # 2245 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2246 # object reference to use this method on 2247 # @param plain_server [Integer, #to_int, #to_i] 2248 # @return [void] 2249 def self.set_plain_server(self_p, plain_server) 2250 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2251 plain_server = Integer(plain_server) 2252 result = ::CZMQ::FFI.zsock_set_plain_server(self_p, plain_server) 2253 result 2254 end 2255 2256 # Get socket option `plain_username`. 2257 # Available from libzmq 4.0.0. 2258 # 2259 # @return [::FFI::AutoPointer] 2260 def plain_username() 2261 raise DestroyedError unless @ptr 2262 self_p = @ptr 2263 result = ::CZMQ::FFI.zsock_plain_username(self_p) 2264 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 2265 result 2266 end 2267 2268 # Get socket option `plain_username`. 2269 # Available from libzmq 4.0.0. 2270 # 2271 # This is the polymorphic version of #plain_username. 2272 # 2273 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2274 # object reference to use this method on 2275 # @return [::FFI::AutoPointer] 2276 def self.plain_username(self_p) 2277 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2278 result = ::CZMQ::FFI.zsock_plain_username(self_p) 2279 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 2280 result 2281 end 2282 2283 # Set socket option `plain_username`. 2284 # Available from libzmq 4.0.0. 2285 # 2286 # @param plain_username [String, #to_s, nil] 2287 # @return [void] 2288 def set_plain_username(plain_username) 2289 raise DestroyedError unless @ptr 2290 self_p = @ptr 2291 result = ::CZMQ::FFI.zsock_set_plain_username(self_p, plain_username) 2292 result 2293 end 2294 2295 # Set socket option `plain_username`. 2296 # Available from libzmq 4.0.0. 2297 # 2298 # This is the polymorphic version of #set_plain_username. 2299 # 2300 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2301 # object reference to use this method on 2302 # @param plain_username [String, #to_s, nil] 2303 # @return [void] 2304 def self.set_plain_username(self_p, plain_username) 2305 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2306 result = ::CZMQ::FFI.zsock_set_plain_username(self_p, plain_username) 2307 result 2308 end 2309 2310 # Get socket option `plain_password`. 2311 # Available from libzmq 4.0.0. 2312 # 2313 # @return [::FFI::AutoPointer] 2314 def plain_password() 2315 raise DestroyedError unless @ptr 2316 self_p = @ptr 2317 result = ::CZMQ::FFI.zsock_plain_password(self_p) 2318 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 2319 result 2320 end 2321 2322 # Get socket option `plain_password`. 2323 # Available from libzmq 4.0.0. 2324 # 2325 # This is the polymorphic version of #plain_password. 2326 # 2327 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2328 # object reference to use this method on 2329 # @return [::FFI::AutoPointer] 2330 def self.plain_password(self_p) 2331 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2332 result = ::CZMQ::FFI.zsock_plain_password(self_p) 2333 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 2334 result 2335 end 2336 2337 # Set socket option `plain_password`. 2338 # Available from libzmq 4.0.0. 2339 # 2340 # @param plain_password [String, #to_s, nil] 2341 # @return [void] 2342 def set_plain_password(plain_password) 2343 raise DestroyedError unless @ptr 2344 self_p = @ptr 2345 result = ::CZMQ::FFI.zsock_set_plain_password(self_p, plain_password) 2346 result 2347 end 2348 2349 # Set socket option `plain_password`. 2350 # Available from libzmq 4.0.0. 2351 # 2352 # This is the polymorphic version of #set_plain_password. 2353 # 2354 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2355 # object reference to use this method on 2356 # @param plain_password [String, #to_s, nil] 2357 # @return [void] 2358 def self.set_plain_password(self_p, plain_password) 2359 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2360 result = ::CZMQ::FFI.zsock_set_plain_password(self_p, plain_password) 2361 result 2362 end 2363 2364 # Get socket option `curve_server`. 2365 # Available from libzmq 4.0.0. 2366 # 2367 # @return [Integer] 2368 def curve_server() 2369 raise DestroyedError unless @ptr 2370 self_p = @ptr 2371 result = ::CZMQ::FFI.zsock_curve_server(self_p) 2372 result 2373 end 2374 2375 # Get socket option `curve_server`. 2376 # Available from libzmq 4.0.0. 2377 # 2378 # This is the polymorphic version of #curve_server. 2379 # 2380 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2381 # object reference to use this method on 2382 # @return [Integer] 2383 def self.curve_server(self_p) 2384 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2385 result = ::CZMQ::FFI.zsock_curve_server(self_p) 2386 result 2387 end 2388 2389 # Set socket option `curve_server`. 2390 # Available from libzmq 4.0.0. 2391 # 2392 # @param curve_server [Integer, #to_int, #to_i] 2393 # @return [void] 2394 def set_curve_server(curve_server) 2395 raise DestroyedError unless @ptr 2396 self_p = @ptr 2397 curve_server = Integer(curve_server) 2398 result = ::CZMQ::FFI.zsock_set_curve_server(self_p, curve_server) 2399 result 2400 end 2401 2402 # Set socket option `curve_server`. 2403 # Available from libzmq 4.0.0. 2404 # 2405 # This is the polymorphic version of #set_curve_server. 2406 # 2407 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2408 # object reference to use this method on 2409 # @param curve_server [Integer, #to_int, #to_i] 2410 # @return [void] 2411 def self.set_curve_server(self_p, curve_server) 2412 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2413 curve_server = Integer(curve_server) 2414 result = ::CZMQ::FFI.zsock_set_curve_server(self_p, curve_server) 2415 result 2416 end 2417 2418 # Get socket option `curve_publickey`. 2419 # Available from libzmq 4.0.0. 2420 # 2421 # @return [::FFI::AutoPointer] 2422 def curve_publickey() 2423 raise DestroyedError unless @ptr 2424 self_p = @ptr 2425 result = ::CZMQ::FFI.zsock_curve_publickey(self_p) 2426 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 2427 result 2428 end 2429 2430 # Get socket option `curve_publickey`. 2431 # Available from libzmq 4.0.0. 2432 # 2433 # This is the polymorphic version of #curve_publickey. 2434 # 2435 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2436 # object reference to use this method on 2437 # @return [::FFI::AutoPointer] 2438 def self.curve_publickey(self_p) 2439 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2440 result = ::CZMQ::FFI.zsock_curve_publickey(self_p) 2441 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 2442 result 2443 end 2444 2445 # Set socket option `curve_publickey`. 2446 # Available from libzmq 4.0.0. 2447 # 2448 # @param curve_publickey [String, #to_s, nil] 2449 # @return [void] 2450 def set_curve_publickey(curve_publickey) 2451 raise DestroyedError unless @ptr 2452 self_p = @ptr 2453 result = ::CZMQ::FFI.zsock_set_curve_publickey(self_p, curve_publickey) 2454 result 2455 end 2456 2457 # Set socket option `curve_publickey`. 2458 # Available from libzmq 4.0.0. 2459 # 2460 # This is the polymorphic version of #set_curve_publickey. 2461 # 2462 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2463 # object reference to use this method on 2464 # @param curve_publickey [String, #to_s, nil] 2465 # @return [void] 2466 def self.set_curve_publickey(self_p, curve_publickey) 2467 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2468 result = ::CZMQ::FFI.zsock_set_curve_publickey(self_p, curve_publickey) 2469 result 2470 end 2471 2472 # Set socket option `curve_publickey` from 32-octet binary 2473 # Available from libzmq 4.0.0. 2474 # 2475 # @param curve_publickey [::FFI::Pointer, #to_ptr] 2476 # @return [void] 2477 def set_curve_publickey_bin(curve_publickey) 2478 raise DestroyedError unless @ptr 2479 self_p = @ptr 2480 result = ::CZMQ::FFI.zsock_set_curve_publickey_bin(self_p, curve_publickey) 2481 result 2482 end 2483 2484 # Set socket option `curve_publickey` from 32-octet binary 2485 # Available from libzmq 4.0.0. 2486 # 2487 # This is the polymorphic version of #set_curve_publickey_bin. 2488 # 2489 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2490 # object reference to use this method on 2491 # @param curve_publickey [::FFI::Pointer, #to_ptr] 2492 # @return [void] 2493 def self.set_curve_publickey_bin(self_p, curve_publickey) 2494 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2495 result = ::CZMQ::FFI.zsock_set_curve_publickey_bin(self_p, curve_publickey) 2496 result 2497 end 2498 2499 # Get socket option `curve_secretkey`. 2500 # Available from libzmq 4.0.0. 2501 # 2502 # @return [::FFI::AutoPointer] 2503 def curve_secretkey() 2504 raise DestroyedError unless @ptr 2505 self_p = @ptr 2506 result = ::CZMQ::FFI.zsock_curve_secretkey(self_p) 2507 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 2508 result 2509 end 2510 2511 # Get socket option `curve_secretkey`. 2512 # Available from libzmq 4.0.0. 2513 # 2514 # This is the polymorphic version of #curve_secretkey. 2515 # 2516 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2517 # object reference to use this method on 2518 # @return [::FFI::AutoPointer] 2519 def self.curve_secretkey(self_p) 2520 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2521 result = ::CZMQ::FFI.zsock_curve_secretkey(self_p) 2522 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 2523 result 2524 end 2525 2526 # Set socket option `curve_secretkey`. 2527 # Available from libzmq 4.0.0. 2528 # 2529 # @param curve_secretkey [String, #to_s, nil] 2530 # @return [void] 2531 def set_curve_secretkey(curve_secretkey) 2532 raise DestroyedError unless @ptr 2533 self_p = @ptr 2534 result = ::CZMQ::FFI.zsock_set_curve_secretkey(self_p, curve_secretkey) 2535 result 2536 end 2537 2538 # Set socket option `curve_secretkey`. 2539 # Available from libzmq 4.0.0. 2540 # 2541 # This is the polymorphic version of #set_curve_secretkey. 2542 # 2543 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2544 # object reference to use this method on 2545 # @param curve_secretkey [String, #to_s, nil] 2546 # @return [void] 2547 def self.set_curve_secretkey(self_p, curve_secretkey) 2548 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2549 result = ::CZMQ::FFI.zsock_set_curve_secretkey(self_p, curve_secretkey) 2550 result 2551 end 2552 2553 # Set socket option `curve_secretkey` from 32-octet binary 2554 # Available from libzmq 4.0.0. 2555 # 2556 # @param curve_secretkey [::FFI::Pointer, #to_ptr] 2557 # @return [void] 2558 def set_curve_secretkey_bin(curve_secretkey) 2559 raise DestroyedError unless @ptr 2560 self_p = @ptr 2561 result = ::CZMQ::FFI.zsock_set_curve_secretkey_bin(self_p, curve_secretkey) 2562 result 2563 end 2564 2565 # Set socket option `curve_secretkey` from 32-octet binary 2566 # Available from libzmq 4.0.0. 2567 # 2568 # This is the polymorphic version of #set_curve_secretkey_bin. 2569 # 2570 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2571 # object reference to use this method on 2572 # @param curve_secretkey [::FFI::Pointer, #to_ptr] 2573 # @return [void] 2574 def self.set_curve_secretkey_bin(self_p, curve_secretkey) 2575 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2576 result = ::CZMQ::FFI.zsock_set_curve_secretkey_bin(self_p, curve_secretkey) 2577 result 2578 end 2579 2580 # Get socket option `curve_serverkey`. 2581 # Available from libzmq 4.0.0. 2582 # 2583 # @return [::FFI::AutoPointer] 2584 def curve_serverkey() 2585 raise DestroyedError unless @ptr 2586 self_p = @ptr 2587 result = ::CZMQ::FFI.zsock_curve_serverkey(self_p) 2588 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 2589 result 2590 end 2591 2592 # Get socket option `curve_serverkey`. 2593 # Available from libzmq 4.0.0. 2594 # 2595 # This is the polymorphic version of #curve_serverkey. 2596 # 2597 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2598 # object reference to use this method on 2599 # @return [::FFI::AutoPointer] 2600 def self.curve_serverkey(self_p) 2601 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2602 result = ::CZMQ::FFI.zsock_curve_serverkey(self_p) 2603 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 2604 result 2605 end 2606 2607 # Set socket option `curve_serverkey`. 2608 # Available from libzmq 4.0.0. 2609 # 2610 # @param curve_serverkey [String, #to_s, nil] 2611 # @return [void] 2612 def set_curve_serverkey(curve_serverkey) 2613 raise DestroyedError unless @ptr 2614 self_p = @ptr 2615 result = ::CZMQ::FFI.zsock_set_curve_serverkey(self_p, curve_serverkey) 2616 result 2617 end 2618 2619 # Set socket option `curve_serverkey`. 2620 # Available from libzmq 4.0.0. 2621 # 2622 # This is the polymorphic version of #set_curve_serverkey. 2623 # 2624 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2625 # object reference to use this method on 2626 # @param curve_serverkey [String, #to_s, nil] 2627 # @return [void] 2628 def self.set_curve_serverkey(self_p, curve_serverkey) 2629 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2630 result = ::CZMQ::FFI.zsock_set_curve_serverkey(self_p, curve_serverkey) 2631 result 2632 end 2633 2634 # Set socket option `curve_serverkey` from 32-octet binary 2635 # Available from libzmq 4.0.0. 2636 # 2637 # @param curve_serverkey [::FFI::Pointer, #to_ptr] 2638 # @return [void] 2639 def set_curve_serverkey_bin(curve_serverkey) 2640 raise DestroyedError unless @ptr 2641 self_p = @ptr 2642 result = ::CZMQ::FFI.zsock_set_curve_serverkey_bin(self_p, curve_serverkey) 2643 result 2644 end 2645 2646 # Set socket option `curve_serverkey` from 32-octet binary 2647 # Available from libzmq 4.0.0. 2648 # 2649 # This is the polymorphic version of #set_curve_serverkey_bin. 2650 # 2651 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2652 # object reference to use this method on 2653 # @param curve_serverkey [::FFI::Pointer, #to_ptr] 2654 # @return [void] 2655 def self.set_curve_serverkey_bin(self_p, curve_serverkey) 2656 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2657 result = ::CZMQ::FFI.zsock_set_curve_serverkey_bin(self_p, curve_serverkey) 2658 result 2659 end 2660 2661 # Get socket option `gssapi_server`. 2662 # Available from libzmq 4.0.0. 2663 # 2664 # @return [Integer] 2665 def gssapi_server() 2666 raise DestroyedError unless @ptr 2667 self_p = @ptr 2668 result = ::CZMQ::FFI.zsock_gssapi_server(self_p) 2669 result 2670 end 2671 2672 # Get socket option `gssapi_server`. 2673 # Available from libzmq 4.0.0. 2674 # 2675 # This is the polymorphic version of #gssapi_server. 2676 # 2677 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2678 # object reference to use this method on 2679 # @return [Integer] 2680 def self.gssapi_server(self_p) 2681 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2682 result = ::CZMQ::FFI.zsock_gssapi_server(self_p) 2683 result 2684 end 2685 2686 # Set socket option `gssapi_server`. 2687 # Available from libzmq 4.0.0. 2688 # 2689 # @param gssapi_server [Integer, #to_int, #to_i] 2690 # @return [void] 2691 def set_gssapi_server(gssapi_server) 2692 raise DestroyedError unless @ptr 2693 self_p = @ptr 2694 gssapi_server = Integer(gssapi_server) 2695 result = ::CZMQ::FFI.zsock_set_gssapi_server(self_p, gssapi_server) 2696 result 2697 end 2698 2699 # Set socket option `gssapi_server`. 2700 # Available from libzmq 4.0.0. 2701 # 2702 # This is the polymorphic version of #set_gssapi_server. 2703 # 2704 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2705 # object reference to use this method on 2706 # @param gssapi_server [Integer, #to_int, #to_i] 2707 # @return [void] 2708 def self.set_gssapi_server(self_p, gssapi_server) 2709 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2710 gssapi_server = Integer(gssapi_server) 2711 result = ::CZMQ::FFI.zsock_set_gssapi_server(self_p, gssapi_server) 2712 result 2713 end 2714 2715 # Get socket option `gssapi_plaintext`. 2716 # Available from libzmq 4.0.0. 2717 # 2718 # @return [Integer] 2719 def gssapi_plaintext() 2720 raise DestroyedError unless @ptr 2721 self_p = @ptr 2722 result = ::CZMQ::FFI.zsock_gssapi_plaintext(self_p) 2723 result 2724 end 2725 2726 # Get socket option `gssapi_plaintext`. 2727 # Available from libzmq 4.0.0. 2728 # 2729 # This is the polymorphic version of #gssapi_plaintext. 2730 # 2731 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2732 # object reference to use this method on 2733 # @return [Integer] 2734 def self.gssapi_plaintext(self_p) 2735 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2736 result = ::CZMQ::FFI.zsock_gssapi_plaintext(self_p) 2737 result 2738 end 2739 2740 # Set socket option `gssapi_plaintext`. 2741 # Available from libzmq 4.0.0. 2742 # 2743 # @param gssapi_plaintext [Integer, #to_int, #to_i] 2744 # @return [void] 2745 def set_gssapi_plaintext(gssapi_plaintext) 2746 raise DestroyedError unless @ptr 2747 self_p = @ptr 2748 gssapi_plaintext = Integer(gssapi_plaintext) 2749 result = ::CZMQ::FFI.zsock_set_gssapi_plaintext(self_p, gssapi_plaintext) 2750 result 2751 end 2752 2753 # Set socket option `gssapi_plaintext`. 2754 # Available from libzmq 4.0.0. 2755 # 2756 # This is the polymorphic version of #set_gssapi_plaintext. 2757 # 2758 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2759 # object reference to use this method on 2760 # @param gssapi_plaintext [Integer, #to_int, #to_i] 2761 # @return [void] 2762 def self.set_gssapi_plaintext(self_p, gssapi_plaintext) 2763 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2764 gssapi_plaintext = Integer(gssapi_plaintext) 2765 result = ::CZMQ::FFI.zsock_set_gssapi_plaintext(self_p, gssapi_plaintext) 2766 result 2767 end 2768 2769 # Get socket option `gssapi_principal`. 2770 # Available from libzmq 4.0.0. 2771 # 2772 # @return [::FFI::AutoPointer] 2773 def gssapi_principal() 2774 raise DestroyedError unless @ptr 2775 self_p = @ptr 2776 result = ::CZMQ::FFI.zsock_gssapi_principal(self_p) 2777 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 2778 result 2779 end 2780 2781 # Get socket option `gssapi_principal`. 2782 # Available from libzmq 4.0.0. 2783 # 2784 # This is the polymorphic version of #gssapi_principal. 2785 # 2786 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2787 # object reference to use this method on 2788 # @return [::FFI::AutoPointer] 2789 def self.gssapi_principal(self_p) 2790 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2791 result = ::CZMQ::FFI.zsock_gssapi_principal(self_p) 2792 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 2793 result 2794 end 2795 2796 # Set socket option `gssapi_principal`. 2797 # Available from libzmq 4.0.0. 2798 # 2799 # @param gssapi_principal [String, #to_s, nil] 2800 # @return [void] 2801 def set_gssapi_principal(gssapi_principal) 2802 raise DestroyedError unless @ptr 2803 self_p = @ptr 2804 result = ::CZMQ::FFI.zsock_set_gssapi_principal(self_p, gssapi_principal) 2805 result 2806 end 2807 2808 # Set socket option `gssapi_principal`. 2809 # Available from libzmq 4.0.0. 2810 # 2811 # This is the polymorphic version of #set_gssapi_principal. 2812 # 2813 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2814 # object reference to use this method on 2815 # @param gssapi_principal [String, #to_s, nil] 2816 # @return [void] 2817 def self.set_gssapi_principal(self_p, gssapi_principal) 2818 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2819 result = ::CZMQ::FFI.zsock_set_gssapi_principal(self_p, gssapi_principal) 2820 result 2821 end 2822 2823 # Get socket option `gssapi_service_principal`. 2824 # Available from libzmq 4.0.0. 2825 # 2826 # @return [::FFI::AutoPointer] 2827 def gssapi_service_principal() 2828 raise DestroyedError unless @ptr 2829 self_p = @ptr 2830 result = ::CZMQ::FFI.zsock_gssapi_service_principal(self_p) 2831 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 2832 result 2833 end 2834 2835 # Get socket option `gssapi_service_principal`. 2836 # Available from libzmq 4.0.0. 2837 # 2838 # This is the polymorphic version of #gssapi_service_principal. 2839 # 2840 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2841 # object reference to use this method on 2842 # @return [::FFI::AutoPointer] 2843 def self.gssapi_service_principal(self_p) 2844 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2845 result = ::CZMQ::FFI.zsock_gssapi_service_principal(self_p) 2846 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 2847 result 2848 end 2849 2850 # Set socket option `gssapi_service_principal`. 2851 # Available from libzmq 4.0.0. 2852 # 2853 # @param gssapi_service_principal [String, #to_s, nil] 2854 # @return [void] 2855 def set_gssapi_service_principal(gssapi_service_principal) 2856 raise DestroyedError unless @ptr 2857 self_p = @ptr 2858 result = ::CZMQ::FFI.zsock_set_gssapi_service_principal(self_p, gssapi_service_principal) 2859 result 2860 end 2861 2862 # Set socket option `gssapi_service_principal`. 2863 # Available from libzmq 4.0.0. 2864 # 2865 # This is the polymorphic version of #set_gssapi_service_principal. 2866 # 2867 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2868 # object reference to use this method on 2869 # @param gssapi_service_principal [String, #to_s, nil] 2870 # @return [void] 2871 def self.set_gssapi_service_principal(self_p, gssapi_service_principal) 2872 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2873 result = ::CZMQ::FFI.zsock_set_gssapi_service_principal(self_p, gssapi_service_principal) 2874 result 2875 end 2876 2877 # Get socket option `ipv6`. 2878 # Available from libzmq 4.0.0. 2879 # 2880 # @return [Integer] 2881 def ipv6() 2882 raise DestroyedError unless @ptr 2883 self_p = @ptr 2884 result = ::CZMQ::FFI.zsock_ipv6(self_p) 2885 result 2886 end 2887 2888 # Get socket option `ipv6`. 2889 # Available from libzmq 4.0.0. 2890 # 2891 # This is the polymorphic version of #ipv6. 2892 # 2893 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2894 # object reference to use this method on 2895 # @return [Integer] 2896 def self.ipv6(self_p) 2897 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2898 result = ::CZMQ::FFI.zsock_ipv6(self_p) 2899 result 2900 end 2901 2902 # Set socket option `ipv6`. 2903 # Available from libzmq 4.0.0. 2904 # 2905 # @param ipv6 [Integer, #to_int, #to_i] 2906 # @return [void] 2907 def set_ipv6(ipv6) 2908 raise DestroyedError unless @ptr 2909 self_p = @ptr 2910 ipv6 = Integer(ipv6) 2911 result = ::CZMQ::FFI.zsock_set_ipv6(self_p, ipv6) 2912 result 2913 end 2914 2915 # Set socket option `ipv6`. 2916 # Available from libzmq 4.0.0. 2917 # 2918 # This is the polymorphic version of #set_ipv6. 2919 # 2920 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2921 # object reference to use this method on 2922 # @param ipv6 [Integer, #to_int, #to_i] 2923 # @return [void] 2924 def self.set_ipv6(self_p, ipv6) 2925 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2926 ipv6 = Integer(ipv6) 2927 result = ::CZMQ::FFI.zsock_set_ipv6(self_p, ipv6) 2928 result 2929 end 2930 2931 # Get socket option `immediate`. 2932 # Available from libzmq 4.0.0. 2933 # 2934 # @return [Integer] 2935 def immediate() 2936 raise DestroyedError unless @ptr 2937 self_p = @ptr 2938 result = ::CZMQ::FFI.zsock_immediate(self_p) 2939 result 2940 end 2941 2942 # Get socket option `immediate`. 2943 # Available from libzmq 4.0.0. 2944 # 2945 # This is the polymorphic version of #immediate. 2946 # 2947 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2948 # object reference to use this method on 2949 # @return [Integer] 2950 def self.immediate(self_p) 2951 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2952 result = ::CZMQ::FFI.zsock_immediate(self_p) 2953 result 2954 end 2955 2956 # Set socket option `immediate`. 2957 # Available from libzmq 4.0.0. 2958 # 2959 # @param immediate [Integer, #to_int, #to_i] 2960 # @return [void] 2961 def set_immediate(immediate) 2962 raise DestroyedError unless @ptr 2963 self_p = @ptr 2964 immediate = Integer(immediate) 2965 result = ::CZMQ::FFI.zsock_set_immediate(self_p, immediate) 2966 result 2967 end 2968 2969 # Set socket option `immediate`. 2970 # Available from libzmq 4.0.0. 2971 # 2972 # This is the polymorphic version of #set_immediate. 2973 # 2974 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 2975 # object reference to use this method on 2976 # @param immediate [Integer, #to_int, #to_i] 2977 # @return [void] 2978 def self.set_immediate(self_p, immediate) 2979 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 2980 immediate = Integer(immediate) 2981 result = ::CZMQ::FFI.zsock_set_immediate(self_p, immediate) 2982 result 2983 end 2984 2985 # Get socket option `sndhwm`. 2986 # Available from libzmq 3.0.0. 2987 # 2988 # @return [Integer] 2989 def sndhwm() 2990 raise DestroyedError unless @ptr 2991 self_p = @ptr 2992 result = ::CZMQ::FFI.zsock_sndhwm(self_p) 2993 result 2994 end 2995 2996 # Get socket option `sndhwm`. 2997 # Available from libzmq 3.0.0. 2998 # 2999 # This is the polymorphic version of #sndhwm. 3000 # 3001 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3002 # object reference to use this method on 3003 # @return [Integer] 3004 def self.sndhwm(self_p) 3005 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3006 result = ::CZMQ::FFI.zsock_sndhwm(self_p) 3007 result 3008 end 3009 3010 # Set socket option `sndhwm`. 3011 # Available from libzmq 3.0.0. 3012 # 3013 # @param sndhwm [Integer, #to_int, #to_i] 3014 # @return [void] 3015 def set_sndhwm(sndhwm) 3016 raise DestroyedError unless @ptr 3017 self_p = @ptr 3018 sndhwm = Integer(sndhwm) 3019 result = ::CZMQ::FFI.zsock_set_sndhwm(self_p, sndhwm) 3020 result 3021 end 3022 3023 # Set socket option `sndhwm`. 3024 # Available from libzmq 3.0.0. 3025 # 3026 # This is the polymorphic version of #set_sndhwm. 3027 # 3028 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3029 # object reference to use this method on 3030 # @param sndhwm [Integer, #to_int, #to_i] 3031 # @return [void] 3032 def self.set_sndhwm(self_p, sndhwm) 3033 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3034 sndhwm = Integer(sndhwm) 3035 result = ::CZMQ::FFI.zsock_set_sndhwm(self_p, sndhwm) 3036 result 3037 end 3038 3039 # Get socket option `rcvhwm`. 3040 # Available from libzmq 3.0.0. 3041 # 3042 # @return [Integer] 3043 def rcvhwm() 3044 raise DestroyedError unless @ptr 3045 self_p = @ptr 3046 result = ::CZMQ::FFI.zsock_rcvhwm(self_p) 3047 result 3048 end 3049 3050 # Get socket option `rcvhwm`. 3051 # Available from libzmq 3.0.0. 3052 # 3053 # This is the polymorphic version of #rcvhwm. 3054 # 3055 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3056 # object reference to use this method on 3057 # @return [Integer] 3058 def self.rcvhwm(self_p) 3059 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3060 result = ::CZMQ::FFI.zsock_rcvhwm(self_p) 3061 result 3062 end 3063 3064 # Set socket option `rcvhwm`. 3065 # Available from libzmq 3.0.0. 3066 # 3067 # @param rcvhwm [Integer, #to_int, #to_i] 3068 # @return [void] 3069 def set_rcvhwm(rcvhwm) 3070 raise DestroyedError unless @ptr 3071 self_p = @ptr 3072 rcvhwm = Integer(rcvhwm) 3073 result = ::CZMQ::FFI.zsock_set_rcvhwm(self_p, rcvhwm) 3074 result 3075 end 3076 3077 # Set socket option `rcvhwm`. 3078 # Available from libzmq 3.0.0. 3079 # 3080 # This is the polymorphic version of #set_rcvhwm. 3081 # 3082 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3083 # object reference to use this method on 3084 # @param rcvhwm [Integer, #to_int, #to_i] 3085 # @return [void] 3086 def self.set_rcvhwm(self_p, rcvhwm) 3087 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3088 rcvhwm = Integer(rcvhwm) 3089 result = ::CZMQ::FFI.zsock_set_rcvhwm(self_p, rcvhwm) 3090 result 3091 end 3092 3093 # Get socket option `maxmsgsize`. 3094 # Available from libzmq 3.0.0. 3095 # 3096 # @return [Integer] 3097 def maxmsgsize() 3098 raise DestroyedError unless @ptr 3099 self_p = @ptr 3100 result = ::CZMQ::FFI.zsock_maxmsgsize(self_p) 3101 result 3102 end 3103 3104 # Get socket option `maxmsgsize`. 3105 # Available from libzmq 3.0.0. 3106 # 3107 # This is the polymorphic version of #maxmsgsize. 3108 # 3109 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3110 # object reference to use this method on 3111 # @return [Integer] 3112 def self.maxmsgsize(self_p) 3113 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3114 result = ::CZMQ::FFI.zsock_maxmsgsize(self_p) 3115 result 3116 end 3117 3118 # Set socket option `maxmsgsize`. 3119 # Available from libzmq 3.0.0. 3120 # 3121 # @param maxmsgsize [Integer, #to_int, #to_i] 3122 # @return [void] 3123 def set_maxmsgsize(maxmsgsize) 3124 raise DestroyedError unless @ptr 3125 self_p = @ptr 3126 maxmsgsize = Integer(maxmsgsize) 3127 result = ::CZMQ::FFI.zsock_set_maxmsgsize(self_p, maxmsgsize) 3128 result 3129 end 3130 3131 # Set socket option `maxmsgsize`. 3132 # Available from libzmq 3.0.0. 3133 # 3134 # This is the polymorphic version of #set_maxmsgsize. 3135 # 3136 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3137 # object reference to use this method on 3138 # @param maxmsgsize [Integer, #to_int, #to_i] 3139 # @return [void] 3140 def self.set_maxmsgsize(self_p, maxmsgsize) 3141 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3142 maxmsgsize = Integer(maxmsgsize) 3143 result = ::CZMQ::FFI.zsock_set_maxmsgsize(self_p, maxmsgsize) 3144 result 3145 end 3146 3147 # Get socket option `multicast_hops`. 3148 # Available from libzmq 3.0.0. 3149 # 3150 # @return [Integer] 3151 def multicast_hops() 3152 raise DestroyedError unless @ptr 3153 self_p = @ptr 3154 result = ::CZMQ::FFI.zsock_multicast_hops(self_p) 3155 result 3156 end 3157 3158 # Get socket option `multicast_hops`. 3159 # Available from libzmq 3.0.0. 3160 # 3161 # This is the polymorphic version of #multicast_hops. 3162 # 3163 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3164 # object reference to use this method on 3165 # @return [Integer] 3166 def self.multicast_hops(self_p) 3167 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3168 result = ::CZMQ::FFI.zsock_multicast_hops(self_p) 3169 result 3170 end 3171 3172 # Set socket option `multicast_hops`. 3173 # Available from libzmq 3.0.0. 3174 # 3175 # @param multicast_hops [Integer, #to_int, #to_i] 3176 # @return [void] 3177 def set_multicast_hops(multicast_hops) 3178 raise DestroyedError unless @ptr 3179 self_p = @ptr 3180 multicast_hops = Integer(multicast_hops) 3181 result = ::CZMQ::FFI.zsock_set_multicast_hops(self_p, multicast_hops) 3182 result 3183 end 3184 3185 # Set socket option `multicast_hops`. 3186 # Available from libzmq 3.0.0. 3187 # 3188 # This is the polymorphic version of #set_multicast_hops. 3189 # 3190 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3191 # object reference to use this method on 3192 # @param multicast_hops [Integer, #to_int, #to_i] 3193 # @return [void] 3194 def self.set_multicast_hops(self_p, multicast_hops) 3195 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3196 multicast_hops = Integer(multicast_hops) 3197 result = ::CZMQ::FFI.zsock_set_multicast_hops(self_p, multicast_hops) 3198 result 3199 end 3200 3201 # Set socket option `xpub_verbose`. 3202 # Available from libzmq 3.0.0. 3203 # 3204 # @param xpub_verbose [Integer, #to_int, #to_i] 3205 # @return [void] 3206 def set_xpub_verbose(xpub_verbose) 3207 raise DestroyedError unless @ptr 3208 self_p = @ptr 3209 xpub_verbose = Integer(xpub_verbose) 3210 result = ::CZMQ::FFI.zsock_set_xpub_verbose(self_p, xpub_verbose) 3211 result 3212 end 3213 3214 # Set socket option `xpub_verbose`. 3215 # Available from libzmq 3.0.0. 3216 # 3217 # This is the polymorphic version of #set_xpub_verbose. 3218 # 3219 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3220 # object reference to use this method on 3221 # @param xpub_verbose [Integer, #to_int, #to_i] 3222 # @return [void] 3223 def self.set_xpub_verbose(self_p, xpub_verbose) 3224 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3225 xpub_verbose = Integer(xpub_verbose) 3226 result = ::CZMQ::FFI.zsock_set_xpub_verbose(self_p, xpub_verbose) 3227 result 3228 end 3229 3230 # Get socket option `tcp_keepalive`. 3231 # Available from libzmq 3.0.0. 3232 # 3233 # @return [Integer] 3234 def tcp_keepalive() 3235 raise DestroyedError unless @ptr 3236 self_p = @ptr 3237 result = ::CZMQ::FFI.zsock_tcp_keepalive(self_p) 3238 result 3239 end 3240 3241 # Get socket option `tcp_keepalive`. 3242 # Available from libzmq 3.0.0. 3243 # 3244 # This is the polymorphic version of #tcp_keepalive. 3245 # 3246 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3247 # object reference to use this method on 3248 # @return [Integer] 3249 def self.tcp_keepalive(self_p) 3250 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3251 result = ::CZMQ::FFI.zsock_tcp_keepalive(self_p) 3252 result 3253 end 3254 3255 # Set socket option `tcp_keepalive`. 3256 # Available from libzmq 3.0.0. 3257 # 3258 # @param tcp_keepalive [Integer, #to_int, #to_i] 3259 # @return [void] 3260 def set_tcp_keepalive(tcp_keepalive) 3261 raise DestroyedError unless @ptr 3262 self_p = @ptr 3263 tcp_keepalive = Integer(tcp_keepalive) 3264 result = ::CZMQ::FFI.zsock_set_tcp_keepalive(self_p, tcp_keepalive) 3265 result 3266 end 3267 3268 # Set socket option `tcp_keepalive`. 3269 # Available from libzmq 3.0.0. 3270 # 3271 # This is the polymorphic version of #set_tcp_keepalive. 3272 # 3273 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3274 # object reference to use this method on 3275 # @param tcp_keepalive [Integer, #to_int, #to_i] 3276 # @return [void] 3277 def self.set_tcp_keepalive(self_p, tcp_keepalive) 3278 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3279 tcp_keepalive = Integer(tcp_keepalive) 3280 result = ::CZMQ::FFI.zsock_set_tcp_keepalive(self_p, tcp_keepalive) 3281 result 3282 end 3283 3284 # Get socket option `tcp_keepalive_idle`. 3285 # Available from libzmq 3.0.0. 3286 # 3287 # @return [Integer] 3288 def tcp_keepalive_idle() 3289 raise DestroyedError unless @ptr 3290 self_p = @ptr 3291 result = ::CZMQ::FFI.zsock_tcp_keepalive_idle(self_p) 3292 result 3293 end 3294 3295 # Get socket option `tcp_keepalive_idle`. 3296 # Available from libzmq 3.0.0. 3297 # 3298 # This is the polymorphic version of #tcp_keepalive_idle. 3299 # 3300 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3301 # object reference to use this method on 3302 # @return [Integer] 3303 def self.tcp_keepalive_idle(self_p) 3304 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3305 result = ::CZMQ::FFI.zsock_tcp_keepalive_idle(self_p) 3306 result 3307 end 3308 3309 # Set socket option `tcp_keepalive_idle`. 3310 # Available from libzmq 3.0.0. 3311 # 3312 # @param tcp_keepalive_idle [Integer, #to_int, #to_i] 3313 # @return [void] 3314 def set_tcp_keepalive_idle(tcp_keepalive_idle) 3315 raise DestroyedError unless @ptr 3316 self_p = @ptr 3317 tcp_keepalive_idle = Integer(tcp_keepalive_idle) 3318 result = ::CZMQ::FFI.zsock_set_tcp_keepalive_idle(self_p, tcp_keepalive_idle) 3319 result 3320 end 3321 3322 # Set socket option `tcp_keepalive_idle`. 3323 # Available from libzmq 3.0.0. 3324 # 3325 # This is the polymorphic version of #set_tcp_keepalive_idle. 3326 # 3327 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3328 # object reference to use this method on 3329 # @param tcp_keepalive_idle [Integer, #to_int, #to_i] 3330 # @return [void] 3331 def self.set_tcp_keepalive_idle(self_p, tcp_keepalive_idle) 3332 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3333 tcp_keepalive_idle = Integer(tcp_keepalive_idle) 3334 result = ::CZMQ::FFI.zsock_set_tcp_keepalive_idle(self_p, tcp_keepalive_idle) 3335 result 3336 end 3337 3338 # Get socket option `tcp_keepalive_cnt`. 3339 # Available from libzmq 3.0.0. 3340 # 3341 # @return [Integer] 3342 def tcp_keepalive_cnt() 3343 raise DestroyedError unless @ptr 3344 self_p = @ptr 3345 result = ::CZMQ::FFI.zsock_tcp_keepalive_cnt(self_p) 3346 result 3347 end 3348 3349 # Get socket option `tcp_keepalive_cnt`. 3350 # Available from libzmq 3.0.0. 3351 # 3352 # This is the polymorphic version of #tcp_keepalive_cnt. 3353 # 3354 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3355 # object reference to use this method on 3356 # @return [Integer] 3357 def self.tcp_keepalive_cnt(self_p) 3358 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3359 result = ::CZMQ::FFI.zsock_tcp_keepalive_cnt(self_p) 3360 result 3361 end 3362 3363 # Set socket option `tcp_keepalive_cnt`. 3364 # Available from libzmq 3.0.0. 3365 # 3366 # @param tcp_keepalive_cnt [Integer, #to_int, #to_i] 3367 # @return [void] 3368 def set_tcp_keepalive_cnt(tcp_keepalive_cnt) 3369 raise DestroyedError unless @ptr 3370 self_p = @ptr 3371 tcp_keepalive_cnt = Integer(tcp_keepalive_cnt) 3372 result = ::CZMQ::FFI.zsock_set_tcp_keepalive_cnt(self_p, tcp_keepalive_cnt) 3373 result 3374 end 3375 3376 # Set socket option `tcp_keepalive_cnt`. 3377 # Available from libzmq 3.0.0. 3378 # 3379 # This is the polymorphic version of #set_tcp_keepalive_cnt. 3380 # 3381 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3382 # object reference to use this method on 3383 # @param tcp_keepalive_cnt [Integer, #to_int, #to_i] 3384 # @return [void] 3385 def self.set_tcp_keepalive_cnt(self_p, tcp_keepalive_cnt) 3386 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3387 tcp_keepalive_cnt = Integer(tcp_keepalive_cnt) 3388 result = ::CZMQ::FFI.zsock_set_tcp_keepalive_cnt(self_p, tcp_keepalive_cnt) 3389 result 3390 end 3391 3392 # Get socket option `tcp_keepalive_intvl`. 3393 # Available from libzmq 3.0.0. 3394 # 3395 # @return [Integer] 3396 def tcp_keepalive_intvl() 3397 raise DestroyedError unless @ptr 3398 self_p = @ptr 3399 result = ::CZMQ::FFI.zsock_tcp_keepalive_intvl(self_p) 3400 result 3401 end 3402 3403 # Get socket option `tcp_keepalive_intvl`. 3404 # Available from libzmq 3.0.0. 3405 # 3406 # This is the polymorphic version of #tcp_keepalive_intvl. 3407 # 3408 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3409 # object reference to use this method on 3410 # @return [Integer] 3411 def self.tcp_keepalive_intvl(self_p) 3412 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3413 result = ::CZMQ::FFI.zsock_tcp_keepalive_intvl(self_p) 3414 result 3415 end 3416 3417 # Set socket option `tcp_keepalive_intvl`. 3418 # Available from libzmq 3.0.0. 3419 # 3420 # @param tcp_keepalive_intvl [Integer, #to_int, #to_i] 3421 # @return [void] 3422 def set_tcp_keepalive_intvl(tcp_keepalive_intvl) 3423 raise DestroyedError unless @ptr 3424 self_p = @ptr 3425 tcp_keepalive_intvl = Integer(tcp_keepalive_intvl) 3426 result = ::CZMQ::FFI.zsock_set_tcp_keepalive_intvl(self_p, tcp_keepalive_intvl) 3427 result 3428 end 3429 3430 # Set socket option `tcp_keepalive_intvl`. 3431 # Available from libzmq 3.0.0. 3432 # 3433 # This is the polymorphic version of #set_tcp_keepalive_intvl. 3434 # 3435 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3436 # object reference to use this method on 3437 # @param tcp_keepalive_intvl [Integer, #to_int, #to_i] 3438 # @return [void] 3439 def self.set_tcp_keepalive_intvl(self_p, tcp_keepalive_intvl) 3440 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3441 tcp_keepalive_intvl = Integer(tcp_keepalive_intvl) 3442 result = ::CZMQ::FFI.zsock_set_tcp_keepalive_intvl(self_p, tcp_keepalive_intvl) 3443 result 3444 end 3445 3446 # Get socket option `tcp_accept_filter`. 3447 # Available from libzmq 3.0.0. 3448 # 3449 # @return [::FFI::AutoPointer] 3450 def tcp_accept_filter() 3451 raise DestroyedError unless @ptr 3452 self_p = @ptr 3453 result = ::CZMQ::FFI.zsock_tcp_accept_filter(self_p) 3454 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 3455 result 3456 end 3457 3458 # Get socket option `tcp_accept_filter`. 3459 # Available from libzmq 3.0.0. 3460 # 3461 # This is the polymorphic version of #tcp_accept_filter. 3462 # 3463 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3464 # object reference to use this method on 3465 # @return [::FFI::AutoPointer] 3466 def self.tcp_accept_filter(self_p) 3467 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3468 result = ::CZMQ::FFI.zsock_tcp_accept_filter(self_p) 3469 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 3470 result 3471 end 3472 3473 # Set socket option `tcp_accept_filter`. 3474 # Available from libzmq 3.0.0. 3475 # 3476 # @param tcp_accept_filter [String, #to_s, nil] 3477 # @return [void] 3478 def set_tcp_accept_filter(tcp_accept_filter) 3479 raise DestroyedError unless @ptr 3480 self_p = @ptr 3481 result = ::CZMQ::FFI.zsock_set_tcp_accept_filter(self_p, tcp_accept_filter) 3482 result 3483 end 3484 3485 # Set socket option `tcp_accept_filter`. 3486 # Available from libzmq 3.0.0. 3487 # 3488 # This is the polymorphic version of #set_tcp_accept_filter. 3489 # 3490 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3491 # object reference to use this method on 3492 # @param tcp_accept_filter [String, #to_s, nil] 3493 # @return [void] 3494 def self.set_tcp_accept_filter(self_p, tcp_accept_filter) 3495 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3496 result = ::CZMQ::FFI.zsock_set_tcp_accept_filter(self_p, tcp_accept_filter) 3497 result 3498 end 3499 3500 # Get socket option `last_endpoint`. 3501 # Available from libzmq 3.0.0. 3502 # 3503 # @return [::FFI::AutoPointer] 3504 def last_endpoint() 3505 raise DestroyedError unless @ptr 3506 self_p = @ptr 3507 result = ::CZMQ::FFI.zsock_last_endpoint(self_p) 3508 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 3509 result 3510 end 3511 3512 # Get socket option `last_endpoint`. 3513 # Available from libzmq 3.0.0. 3514 # 3515 # This is the polymorphic version of #last_endpoint. 3516 # 3517 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3518 # object reference to use this method on 3519 # @return [::FFI::AutoPointer] 3520 def self.last_endpoint(self_p) 3521 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3522 result = ::CZMQ::FFI.zsock_last_endpoint(self_p) 3523 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 3524 result 3525 end 3526 3527 # Set socket option `router_raw`. 3528 # Available from libzmq 3.0.0. 3529 # 3530 # @param router_raw [Integer, #to_int, #to_i] 3531 # @return [void] 3532 def set_router_raw(router_raw) 3533 raise DestroyedError unless @ptr 3534 self_p = @ptr 3535 router_raw = Integer(router_raw) 3536 result = ::CZMQ::FFI.zsock_set_router_raw(self_p, router_raw) 3537 result 3538 end 3539 3540 # Set socket option `router_raw`. 3541 # Available from libzmq 3.0.0. 3542 # 3543 # This is the polymorphic version of #set_router_raw. 3544 # 3545 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3546 # object reference to use this method on 3547 # @param router_raw [Integer, #to_int, #to_i] 3548 # @return [void] 3549 def self.set_router_raw(self_p, router_raw) 3550 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3551 router_raw = Integer(router_raw) 3552 result = ::CZMQ::FFI.zsock_set_router_raw(self_p, router_raw) 3553 result 3554 end 3555 3556 # Get socket option `ipv4only`. 3557 # Available from libzmq 3.0.0. 3558 # 3559 # @return [Integer] 3560 def ipv4only() 3561 raise DestroyedError unless @ptr 3562 self_p = @ptr 3563 result = ::CZMQ::FFI.zsock_ipv4only(self_p) 3564 result 3565 end 3566 3567 # Get socket option `ipv4only`. 3568 # Available from libzmq 3.0.0. 3569 # 3570 # This is the polymorphic version of #ipv4only. 3571 # 3572 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3573 # object reference to use this method on 3574 # @return [Integer] 3575 def self.ipv4only(self_p) 3576 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3577 result = ::CZMQ::FFI.zsock_ipv4only(self_p) 3578 result 3579 end 3580 3581 # Set socket option `ipv4only`. 3582 # Available from libzmq 3.0.0. 3583 # 3584 # @param ipv4only [Integer, #to_int, #to_i] 3585 # @return [void] 3586 def set_ipv4only(ipv4only) 3587 raise DestroyedError unless @ptr 3588 self_p = @ptr 3589 ipv4only = Integer(ipv4only) 3590 result = ::CZMQ::FFI.zsock_set_ipv4only(self_p, ipv4only) 3591 result 3592 end 3593 3594 # Set socket option `ipv4only`. 3595 # Available from libzmq 3.0.0. 3596 # 3597 # This is the polymorphic version of #set_ipv4only. 3598 # 3599 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3600 # object reference to use this method on 3601 # @param ipv4only [Integer, #to_int, #to_i] 3602 # @return [void] 3603 def self.set_ipv4only(self_p, ipv4only) 3604 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3605 ipv4only = Integer(ipv4only) 3606 result = ::CZMQ::FFI.zsock_set_ipv4only(self_p, ipv4only) 3607 result 3608 end 3609 3610 # Set socket option `delay_attach_on_connect`. 3611 # Available from libzmq 3.0.0. 3612 # 3613 # @param delay_attach_on_connect [Integer, #to_int, #to_i] 3614 # @return [void] 3615 def set_delay_attach_on_connect(delay_attach_on_connect) 3616 raise DestroyedError unless @ptr 3617 self_p = @ptr 3618 delay_attach_on_connect = Integer(delay_attach_on_connect) 3619 result = ::CZMQ::FFI.zsock_set_delay_attach_on_connect(self_p, delay_attach_on_connect) 3620 result 3621 end 3622 3623 # Set socket option `delay_attach_on_connect`. 3624 # Available from libzmq 3.0.0. 3625 # 3626 # This is the polymorphic version of #set_delay_attach_on_connect. 3627 # 3628 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3629 # object reference to use this method on 3630 # @param delay_attach_on_connect [Integer, #to_int, #to_i] 3631 # @return [void] 3632 def self.set_delay_attach_on_connect(self_p, delay_attach_on_connect) 3633 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3634 delay_attach_on_connect = Integer(delay_attach_on_connect) 3635 result = ::CZMQ::FFI.zsock_set_delay_attach_on_connect(self_p, delay_attach_on_connect) 3636 result 3637 end 3638 3639 # Get socket option `hwm`. 3640 # Available from libzmq 2.0.0 to 3.0.0. 3641 # 3642 # @return [Integer] 3643 def hwm() 3644 raise DestroyedError unless @ptr 3645 self_p = @ptr 3646 result = ::CZMQ::FFI.zsock_hwm(self_p) 3647 result 3648 end 3649 3650 # Get socket option `hwm`. 3651 # Available from libzmq 2.0.0 to 3.0.0. 3652 # 3653 # This is the polymorphic version of #hwm. 3654 # 3655 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3656 # object reference to use this method on 3657 # @return [Integer] 3658 def self.hwm(self_p) 3659 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3660 result = ::CZMQ::FFI.zsock_hwm(self_p) 3661 result 3662 end 3663 3664 # Set socket option `hwm`. 3665 # Available from libzmq 2.0.0 to 3.0.0. 3666 # 3667 # @param hwm [Integer, #to_int, #to_i] 3668 # @return [void] 3669 def set_hwm(hwm) 3670 raise DestroyedError unless @ptr 3671 self_p = @ptr 3672 hwm = Integer(hwm) 3673 result = ::CZMQ::FFI.zsock_set_hwm(self_p, hwm) 3674 result 3675 end 3676 3677 # Set socket option `hwm`. 3678 # Available from libzmq 2.0.0 to 3.0.0. 3679 # 3680 # This is the polymorphic version of #set_hwm. 3681 # 3682 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3683 # object reference to use this method on 3684 # @param hwm [Integer, #to_int, #to_i] 3685 # @return [void] 3686 def self.set_hwm(self_p, hwm) 3687 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3688 hwm = Integer(hwm) 3689 result = ::CZMQ::FFI.zsock_set_hwm(self_p, hwm) 3690 result 3691 end 3692 3693 # Get socket option `swap`. 3694 # Available from libzmq 2.0.0 to 3.0.0. 3695 # 3696 # @return [Integer] 3697 def swap() 3698 raise DestroyedError unless @ptr 3699 self_p = @ptr 3700 result = ::CZMQ::FFI.zsock_swap(self_p) 3701 result 3702 end 3703 3704 # Get socket option `swap`. 3705 # Available from libzmq 2.0.0 to 3.0.0. 3706 # 3707 # This is the polymorphic version of #swap. 3708 # 3709 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3710 # object reference to use this method on 3711 # @return [Integer] 3712 def self.swap(self_p) 3713 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3714 result = ::CZMQ::FFI.zsock_swap(self_p) 3715 result 3716 end 3717 3718 # Set socket option `swap`. 3719 # Available from libzmq 2.0.0 to 3.0.0. 3720 # 3721 # @param swap [Integer, #to_int, #to_i] 3722 # @return [void] 3723 def set_swap(swap) 3724 raise DestroyedError unless @ptr 3725 self_p = @ptr 3726 swap = Integer(swap) 3727 result = ::CZMQ::FFI.zsock_set_swap(self_p, swap) 3728 result 3729 end 3730 3731 # Set socket option `swap`. 3732 # Available from libzmq 2.0.0 to 3.0.0. 3733 # 3734 # This is the polymorphic version of #set_swap. 3735 # 3736 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3737 # object reference to use this method on 3738 # @param swap [Integer, #to_int, #to_i] 3739 # @return [void] 3740 def self.set_swap(self_p, swap) 3741 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3742 swap = Integer(swap) 3743 result = ::CZMQ::FFI.zsock_set_swap(self_p, swap) 3744 result 3745 end 3746 3747 # Get socket option `affinity`. 3748 # Available from libzmq 2.0.0. 3749 # 3750 # @return [Integer] 3751 def affinity() 3752 raise DestroyedError unless @ptr 3753 self_p = @ptr 3754 result = ::CZMQ::FFI.zsock_affinity(self_p) 3755 result 3756 end 3757 3758 # Get socket option `affinity`. 3759 # Available from libzmq 2.0.0. 3760 # 3761 # This is the polymorphic version of #affinity. 3762 # 3763 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3764 # object reference to use this method on 3765 # @return [Integer] 3766 def self.affinity(self_p) 3767 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3768 result = ::CZMQ::FFI.zsock_affinity(self_p) 3769 result 3770 end 3771 3772 # Set socket option `affinity`. 3773 # Available from libzmq 2.0.0. 3774 # 3775 # @param affinity [Integer, #to_int, #to_i] 3776 # @return [void] 3777 def set_affinity(affinity) 3778 raise DestroyedError unless @ptr 3779 self_p = @ptr 3780 affinity = Integer(affinity) 3781 result = ::CZMQ::FFI.zsock_set_affinity(self_p, affinity) 3782 result 3783 end 3784 3785 # Set socket option `affinity`. 3786 # Available from libzmq 2.0.0. 3787 # 3788 # This is the polymorphic version of #set_affinity. 3789 # 3790 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3791 # object reference to use this method on 3792 # @param affinity [Integer, #to_int, #to_i] 3793 # @return [void] 3794 def self.set_affinity(self_p, affinity) 3795 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3796 affinity = Integer(affinity) 3797 result = ::CZMQ::FFI.zsock_set_affinity(self_p, affinity) 3798 result 3799 end 3800 3801 # Get socket option `identity`. 3802 # Available from libzmq 2.0.0. 3803 # 3804 # @return [::FFI::AutoPointer] 3805 def identity() 3806 raise DestroyedError unless @ptr 3807 self_p = @ptr 3808 result = ::CZMQ::FFI.zsock_identity(self_p) 3809 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 3810 result 3811 end 3812 3813 # Get socket option `identity`. 3814 # Available from libzmq 2.0.0. 3815 # 3816 # This is the polymorphic version of #identity. 3817 # 3818 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3819 # object reference to use this method on 3820 # @return [::FFI::AutoPointer] 3821 def self.identity(self_p) 3822 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3823 result = ::CZMQ::FFI.zsock_identity(self_p) 3824 result = ::FFI::AutoPointer.new(result, LibC.method(:free)) 3825 result 3826 end 3827 3828 # Set socket option `identity`. 3829 # Available from libzmq 2.0.0. 3830 # 3831 # @param identity [String, #to_s, nil] 3832 # @return [void] 3833 def set_identity(identity) 3834 raise DestroyedError unless @ptr 3835 self_p = @ptr 3836 result = ::CZMQ::FFI.zsock_set_identity(self_p, identity) 3837 result 3838 end 3839 3840 # Set socket option `identity`. 3841 # Available from libzmq 2.0.0. 3842 # 3843 # This is the polymorphic version of #set_identity. 3844 # 3845 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3846 # object reference to use this method on 3847 # @param identity [String, #to_s, nil] 3848 # @return [void] 3849 def self.set_identity(self_p, identity) 3850 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3851 result = ::CZMQ::FFI.zsock_set_identity(self_p, identity) 3852 result 3853 end 3854 3855 # Get socket option `rate`. 3856 # Available from libzmq 2.0.0. 3857 # 3858 # @return [Integer] 3859 def rate() 3860 raise DestroyedError unless @ptr 3861 self_p = @ptr 3862 result = ::CZMQ::FFI.zsock_rate(self_p) 3863 result 3864 end 3865 3866 # Get socket option `rate`. 3867 # Available from libzmq 2.0.0. 3868 # 3869 # This is the polymorphic version of #rate. 3870 # 3871 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3872 # object reference to use this method on 3873 # @return [Integer] 3874 def self.rate(self_p) 3875 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3876 result = ::CZMQ::FFI.zsock_rate(self_p) 3877 result 3878 end 3879 3880 # Set socket option `rate`. 3881 # Available from libzmq 2.0.0. 3882 # 3883 # @param rate [Integer, #to_int, #to_i] 3884 # @return [void] 3885 def set_rate(rate) 3886 raise DestroyedError unless @ptr 3887 self_p = @ptr 3888 rate = Integer(rate) 3889 result = ::CZMQ::FFI.zsock_set_rate(self_p, rate) 3890 result 3891 end 3892 3893 # Set socket option `rate`. 3894 # Available from libzmq 2.0.0. 3895 # 3896 # This is the polymorphic version of #set_rate. 3897 # 3898 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3899 # object reference to use this method on 3900 # @param rate [Integer, #to_int, #to_i] 3901 # @return [void] 3902 def self.set_rate(self_p, rate) 3903 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3904 rate = Integer(rate) 3905 result = ::CZMQ::FFI.zsock_set_rate(self_p, rate) 3906 result 3907 end 3908 3909 # Get socket option `recovery_ivl`. 3910 # Available from libzmq 2.0.0. 3911 # 3912 # @return [Integer] 3913 def recovery_ivl() 3914 raise DestroyedError unless @ptr 3915 self_p = @ptr 3916 result = ::CZMQ::FFI.zsock_recovery_ivl(self_p) 3917 result 3918 end 3919 3920 # Get socket option `recovery_ivl`. 3921 # Available from libzmq 2.0.0. 3922 # 3923 # This is the polymorphic version of #recovery_ivl. 3924 # 3925 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3926 # object reference to use this method on 3927 # @return [Integer] 3928 def self.recovery_ivl(self_p) 3929 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3930 result = ::CZMQ::FFI.zsock_recovery_ivl(self_p) 3931 result 3932 end 3933 3934 # Set socket option `recovery_ivl`. 3935 # Available from libzmq 2.0.0. 3936 # 3937 # @param recovery_ivl [Integer, #to_int, #to_i] 3938 # @return [void] 3939 def set_recovery_ivl(recovery_ivl) 3940 raise DestroyedError unless @ptr 3941 self_p = @ptr 3942 recovery_ivl = Integer(recovery_ivl) 3943 result = ::CZMQ::FFI.zsock_set_recovery_ivl(self_p, recovery_ivl) 3944 result 3945 end 3946 3947 # Set socket option `recovery_ivl`. 3948 # Available from libzmq 2.0.0. 3949 # 3950 # This is the polymorphic version of #set_recovery_ivl. 3951 # 3952 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3953 # object reference to use this method on 3954 # @param recovery_ivl [Integer, #to_int, #to_i] 3955 # @return [void] 3956 def self.set_recovery_ivl(self_p, recovery_ivl) 3957 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3958 recovery_ivl = Integer(recovery_ivl) 3959 result = ::CZMQ::FFI.zsock_set_recovery_ivl(self_p, recovery_ivl) 3960 result 3961 end 3962 3963 # Get socket option `recovery_ivl_msec`. 3964 # Available from libzmq 2.0.0 to 3.0.0. 3965 # 3966 # @return [Integer] 3967 def recovery_ivl_msec() 3968 raise DestroyedError unless @ptr 3969 self_p = @ptr 3970 result = ::CZMQ::FFI.zsock_recovery_ivl_msec(self_p) 3971 result 3972 end 3973 3974 # Get socket option `recovery_ivl_msec`. 3975 # Available from libzmq 2.0.0 to 3.0.0. 3976 # 3977 # This is the polymorphic version of #recovery_ivl_msec. 3978 # 3979 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 3980 # object reference to use this method on 3981 # @return [Integer] 3982 def self.recovery_ivl_msec(self_p) 3983 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 3984 result = ::CZMQ::FFI.zsock_recovery_ivl_msec(self_p) 3985 result 3986 end 3987 3988 # Set socket option `recovery_ivl_msec`. 3989 # Available from libzmq 2.0.0 to 3.0.0. 3990 # 3991 # @param recovery_ivl_msec [Integer, #to_int, #to_i] 3992 # @return [void] 3993 def set_recovery_ivl_msec(recovery_ivl_msec) 3994 raise DestroyedError unless @ptr 3995 self_p = @ptr 3996 recovery_ivl_msec = Integer(recovery_ivl_msec) 3997 result = ::CZMQ::FFI.zsock_set_recovery_ivl_msec(self_p, recovery_ivl_msec) 3998 result 3999 end 4000 4001 # Set socket option `recovery_ivl_msec`. 4002 # Available from libzmq 2.0.0 to 3.0.0. 4003 # 4004 # This is the polymorphic version of #set_recovery_ivl_msec. 4005 # 4006 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4007 # object reference to use this method on 4008 # @param recovery_ivl_msec [Integer, #to_int, #to_i] 4009 # @return [void] 4010 def self.set_recovery_ivl_msec(self_p, recovery_ivl_msec) 4011 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4012 recovery_ivl_msec = Integer(recovery_ivl_msec) 4013 result = ::CZMQ::FFI.zsock_set_recovery_ivl_msec(self_p, recovery_ivl_msec) 4014 result 4015 end 4016 4017 # Get socket option `mcast_loop`. 4018 # Available from libzmq 2.0.0 to 3.0.0. 4019 # 4020 # @return [Integer] 4021 def mcast_loop() 4022 raise DestroyedError unless @ptr 4023 self_p = @ptr 4024 result = ::CZMQ::FFI.zsock_mcast_loop(self_p) 4025 result 4026 end 4027 4028 # Get socket option `mcast_loop`. 4029 # Available from libzmq 2.0.0 to 3.0.0. 4030 # 4031 # This is the polymorphic version of #mcast_loop. 4032 # 4033 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4034 # object reference to use this method on 4035 # @return [Integer] 4036 def self.mcast_loop(self_p) 4037 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4038 result = ::CZMQ::FFI.zsock_mcast_loop(self_p) 4039 result 4040 end 4041 4042 # Set socket option `mcast_loop`. 4043 # Available from libzmq 2.0.0 to 3.0.0. 4044 # 4045 # @param mcast_loop [Integer, #to_int, #to_i] 4046 # @return [void] 4047 def set_mcast_loop(mcast_loop) 4048 raise DestroyedError unless @ptr 4049 self_p = @ptr 4050 mcast_loop = Integer(mcast_loop) 4051 result = ::CZMQ::FFI.zsock_set_mcast_loop(self_p, mcast_loop) 4052 result 4053 end 4054 4055 # Set socket option `mcast_loop`. 4056 # Available from libzmq 2.0.0 to 3.0.0. 4057 # 4058 # This is the polymorphic version of #set_mcast_loop. 4059 # 4060 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4061 # object reference to use this method on 4062 # @param mcast_loop [Integer, #to_int, #to_i] 4063 # @return [void] 4064 def self.set_mcast_loop(self_p, mcast_loop) 4065 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4066 mcast_loop = Integer(mcast_loop) 4067 result = ::CZMQ::FFI.zsock_set_mcast_loop(self_p, mcast_loop) 4068 result 4069 end 4070 4071 # Get socket option `rcvtimeo`. 4072 # Available from libzmq 2.2.0. 4073 # 4074 # @return [Integer] 4075 def rcvtimeo() 4076 raise DestroyedError unless @ptr 4077 self_p = @ptr 4078 result = ::CZMQ::FFI.zsock_rcvtimeo(self_p) 4079 result 4080 end 4081 4082 # Get socket option `rcvtimeo`. 4083 # Available from libzmq 2.2.0. 4084 # 4085 # This is the polymorphic version of #rcvtimeo. 4086 # 4087 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4088 # object reference to use this method on 4089 # @return [Integer] 4090 def self.rcvtimeo(self_p) 4091 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4092 result = ::CZMQ::FFI.zsock_rcvtimeo(self_p) 4093 result 4094 end 4095 4096 # Set socket option `rcvtimeo`. 4097 # Available from libzmq 2.2.0. 4098 # 4099 # @param rcvtimeo [Integer, #to_int, #to_i] 4100 # @return [void] 4101 def set_rcvtimeo(rcvtimeo) 4102 raise DestroyedError unless @ptr 4103 self_p = @ptr 4104 rcvtimeo = Integer(rcvtimeo) 4105 result = ::CZMQ::FFI.zsock_set_rcvtimeo(self_p, rcvtimeo) 4106 result 4107 end 4108 4109 # Set socket option `rcvtimeo`. 4110 # Available from libzmq 2.2.0. 4111 # 4112 # This is the polymorphic version of #set_rcvtimeo. 4113 # 4114 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4115 # object reference to use this method on 4116 # @param rcvtimeo [Integer, #to_int, #to_i] 4117 # @return [void] 4118 def self.set_rcvtimeo(self_p, rcvtimeo) 4119 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4120 rcvtimeo = Integer(rcvtimeo) 4121 result = ::CZMQ::FFI.zsock_set_rcvtimeo(self_p, rcvtimeo) 4122 result 4123 end 4124 4125 # Get socket option `sndtimeo`. 4126 # Available from libzmq 2.2.0. 4127 # 4128 # @return [Integer] 4129 def sndtimeo() 4130 raise DestroyedError unless @ptr 4131 self_p = @ptr 4132 result = ::CZMQ::FFI.zsock_sndtimeo(self_p) 4133 result 4134 end 4135 4136 # Get socket option `sndtimeo`. 4137 # Available from libzmq 2.2.0. 4138 # 4139 # This is the polymorphic version of #sndtimeo. 4140 # 4141 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4142 # object reference to use this method on 4143 # @return [Integer] 4144 def self.sndtimeo(self_p) 4145 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4146 result = ::CZMQ::FFI.zsock_sndtimeo(self_p) 4147 result 4148 end 4149 4150 # Set socket option `sndtimeo`. 4151 # Available from libzmq 2.2.0. 4152 # 4153 # @param sndtimeo [Integer, #to_int, #to_i] 4154 # @return [void] 4155 def set_sndtimeo(sndtimeo) 4156 raise DestroyedError unless @ptr 4157 self_p = @ptr 4158 sndtimeo = Integer(sndtimeo) 4159 result = ::CZMQ::FFI.zsock_set_sndtimeo(self_p, sndtimeo) 4160 result 4161 end 4162 4163 # Set socket option `sndtimeo`. 4164 # Available from libzmq 2.2.0. 4165 # 4166 # This is the polymorphic version of #set_sndtimeo. 4167 # 4168 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4169 # object reference to use this method on 4170 # @param sndtimeo [Integer, #to_int, #to_i] 4171 # @return [void] 4172 def self.set_sndtimeo(self_p, sndtimeo) 4173 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4174 sndtimeo = Integer(sndtimeo) 4175 result = ::CZMQ::FFI.zsock_set_sndtimeo(self_p, sndtimeo) 4176 result 4177 end 4178 4179 # Get socket option `sndbuf`. 4180 # Available from libzmq 2.0.0. 4181 # 4182 # @return [Integer] 4183 def sndbuf() 4184 raise DestroyedError unless @ptr 4185 self_p = @ptr 4186 result = ::CZMQ::FFI.zsock_sndbuf(self_p) 4187 result 4188 end 4189 4190 # Get socket option `sndbuf`. 4191 # Available from libzmq 2.0.0. 4192 # 4193 # This is the polymorphic version of #sndbuf. 4194 # 4195 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4196 # object reference to use this method on 4197 # @return [Integer] 4198 def self.sndbuf(self_p) 4199 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4200 result = ::CZMQ::FFI.zsock_sndbuf(self_p) 4201 result 4202 end 4203 4204 # Set socket option `sndbuf`. 4205 # Available from libzmq 2.0.0. 4206 # 4207 # @param sndbuf [Integer, #to_int, #to_i] 4208 # @return [void] 4209 def set_sndbuf(sndbuf) 4210 raise DestroyedError unless @ptr 4211 self_p = @ptr 4212 sndbuf = Integer(sndbuf) 4213 result = ::CZMQ::FFI.zsock_set_sndbuf(self_p, sndbuf) 4214 result 4215 end 4216 4217 # Set socket option `sndbuf`. 4218 # Available from libzmq 2.0.0. 4219 # 4220 # This is the polymorphic version of #set_sndbuf. 4221 # 4222 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4223 # object reference to use this method on 4224 # @param sndbuf [Integer, #to_int, #to_i] 4225 # @return [void] 4226 def self.set_sndbuf(self_p, sndbuf) 4227 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4228 sndbuf = Integer(sndbuf) 4229 result = ::CZMQ::FFI.zsock_set_sndbuf(self_p, sndbuf) 4230 result 4231 end 4232 4233 # Get socket option `rcvbuf`. 4234 # Available from libzmq 2.0.0. 4235 # 4236 # @return [Integer] 4237 def rcvbuf() 4238 raise DestroyedError unless @ptr 4239 self_p = @ptr 4240 result = ::CZMQ::FFI.zsock_rcvbuf(self_p) 4241 result 4242 end 4243 4244 # Get socket option `rcvbuf`. 4245 # Available from libzmq 2.0.0. 4246 # 4247 # This is the polymorphic version of #rcvbuf. 4248 # 4249 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4250 # object reference to use this method on 4251 # @return [Integer] 4252 def self.rcvbuf(self_p) 4253 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4254 result = ::CZMQ::FFI.zsock_rcvbuf(self_p) 4255 result 4256 end 4257 4258 # Set socket option `rcvbuf`. 4259 # Available from libzmq 2.0.0. 4260 # 4261 # @param rcvbuf [Integer, #to_int, #to_i] 4262 # @return [void] 4263 def set_rcvbuf(rcvbuf) 4264 raise DestroyedError unless @ptr 4265 self_p = @ptr 4266 rcvbuf = Integer(rcvbuf) 4267 result = ::CZMQ::FFI.zsock_set_rcvbuf(self_p, rcvbuf) 4268 result 4269 end 4270 4271 # Set socket option `rcvbuf`. 4272 # Available from libzmq 2.0.0. 4273 # 4274 # This is the polymorphic version of #set_rcvbuf. 4275 # 4276 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4277 # object reference to use this method on 4278 # @param rcvbuf [Integer, #to_int, #to_i] 4279 # @return [void] 4280 def self.set_rcvbuf(self_p, rcvbuf) 4281 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4282 rcvbuf = Integer(rcvbuf) 4283 result = ::CZMQ::FFI.zsock_set_rcvbuf(self_p, rcvbuf) 4284 result 4285 end 4286 4287 # Get socket option `linger`. 4288 # Available from libzmq 2.0.0. 4289 # 4290 # @return [Integer] 4291 def linger() 4292 raise DestroyedError unless @ptr 4293 self_p = @ptr 4294 result = ::CZMQ::FFI.zsock_linger(self_p) 4295 result 4296 end 4297 4298 # Get socket option `linger`. 4299 # Available from libzmq 2.0.0. 4300 # 4301 # This is the polymorphic version of #linger. 4302 # 4303 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4304 # object reference to use this method on 4305 # @return [Integer] 4306 def self.linger(self_p) 4307 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4308 result = ::CZMQ::FFI.zsock_linger(self_p) 4309 result 4310 end 4311 4312 # Set socket option `linger`. 4313 # Available from libzmq 2.0.0. 4314 # 4315 # @param linger [Integer, #to_int, #to_i] 4316 # @return [void] 4317 def set_linger(linger) 4318 raise DestroyedError unless @ptr 4319 self_p = @ptr 4320 linger = Integer(linger) 4321 result = ::CZMQ::FFI.zsock_set_linger(self_p, linger) 4322 result 4323 end 4324 4325 # Set socket option `linger`. 4326 # Available from libzmq 2.0.0. 4327 # 4328 # This is the polymorphic version of #set_linger. 4329 # 4330 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4331 # object reference to use this method on 4332 # @param linger [Integer, #to_int, #to_i] 4333 # @return [void] 4334 def self.set_linger(self_p, linger) 4335 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4336 linger = Integer(linger) 4337 result = ::CZMQ::FFI.zsock_set_linger(self_p, linger) 4338 result 4339 end 4340 4341 # Get socket option `reconnect_ivl`. 4342 # Available from libzmq 2.0.0. 4343 # 4344 # @return [Integer] 4345 def reconnect_ivl() 4346 raise DestroyedError unless @ptr 4347 self_p = @ptr 4348 result = ::CZMQ::FFI.zsock_reconnect_ivl(self_p) 4349 result 4350 end 4351 4352 # Get socket option `reconnect_ivl`. 4353 # Available from libzmq 2.0.0. 4354 # 4355 # This is the polymorphic version of #reconnect_ivl. 4356 # 4357 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4358 # object reference to use this method on 4359 # @return [Integer] 4360 def self.reconnect_ivl(self_p) 4361 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4362 result = ::CZMQ::FFI.zsock_reconnect_ivl(self_p) 4363 result 4364 end 4365 4366 # Set socket option `reconnect_ivl`. 4367 # Available from libzmq 2.0.0. 4368 # 4369 # @param reconnect_ivl [Integer, #to_int, #to_i] 4370 # @return [void] 4371 def set_reconnect_ivl(reconnect_ivl) 4372 raise DestroyedError unless @ptr 4373 self_p = @ptr 4374 reconnect_ivl = Integer(reconnect_ivl) 4375 result = ::CZMQ::FFI.zsock_set_reconnect_ivl(self_p, reconnect_ivl) 4376 result 4377 end 4378 4379 # Set socket option `reconnect_ivl`. 4380 # Available from libzmq 2.0.0. 4381 # 4382 # This is the polymorphic version of #set_reconnect_ivl. 4383 # 4384 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4385 # object reference to use this method on 4386 # @param reconnect_ivl [Integer, #to_int, #to_i] 4387 # @return [void] 4388 def self.set_reconnect_ivl(self_p, reconnect_ivl) 4389 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4390 reconnect_ivl = Integer(reconnect_ivl) 4391 result = ::CZMQ::FFI.zsock_set_reconnect_ivl(self_p, reconnect_ivl) 4392 result 4393 end 4394 4395 # Get socket option `reconnect_ivl_max`. 4396 # Available from libzmq 2.0.0. 4397 # 4398 # @return [Integer] 4399 def reconnect_ivl_max() 4400 raise DestroyedError unless @ptr 4401 self_p = @ptr 4402 result = ::CZMQ::FFI.zsock_reconnect_ivl_max(self_p) 4403 result 4404 end 4405 4406 # Get socket option `reconnect_ivl_max`. 4407 # Available from libzmq 2.0.0. 4408 # 4409 # This is the polymorphic version of #reconnect_ivl_max. 4410 # 4411 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4412 # object reference to use this method on 4413 # @return [Integer] 4414 def self.reconnect_ivl_max(self_p) 4415 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4416 result = ::CZMQ::FFI.zsock_reconnect_ivl_max(self_p) 4417 result 4418 end 4419 4420 # Set socket option `reconnect_ivl_max`. 4421 # Available from libzmq 2.0.0. 4422 # 4423 # @param reconnect_ivl_max [Integer, #to_int, #to_i] 4424 # @return [void] 4425 def set_reconnect_ivl_max(reconnect_ivl_max) 4426 raise DestroyedError unless @ptr 4427 self_p = @ptr 4428 reconnect_ivl_max = Integer(reconnect_ivl_max) 4429 result = ::CZMQ::FFI.zsock_set_reconnect_ivl_max(self_p, reconnect_ivl_max) 4430 result 4431 end 4432 4433 # Set socket option `reconnect_ivl_max`. 4434 # Available from libzmq 2.0.0. 4435 # 4436 # This is the polymorphic version of #set_reconnect_ivl_max. 4437 # 4438 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4439 # object reference to use this method on 4440 # @param reconnect_ivl_max [Integer, #to_int, #to_i] 4441 # @return [void] 4442 def self.set_reconnect_ivl_max(self_p, reconnect_ivl_max) 4443 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4444 reconnect_ivl_max = Integer(reconnect_ivl_max) 4445 result = ::CZMQ::FFI.zsock_set_reconnect_ivl_max(self_p, reconnect_ivl_max) 4446 result 4447 end 4448 4449 # Get socket option `backlog`. 4450 # Available from libzmq 2.0.0. 4451 # 4452 # @return [Integer] 4453 def backlog() 4454 raise DestroyedError unless @ptr 4455 self_p = @ptr 4456 result = ::CZMQ::FFI.zsock_backlog(self_p) 4457 result 4458 end 4459 4460 # Get socket option `backlog`. 4461 # Available from libzmq 2.0.0. 4462 # 4463 # This is the polymorphic version of #backlog. 4464 # 4465 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4466 # object reference to use this method on 4467 # @return [Integer] 4468 def self.backlog(self_p) 4469 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4470 result = ::CZMQ::FFI.zsock_backlog(self_p) 4471 result 4472 end 4473 4474 # Set socket option `backlog`. 4475 # Available from libzmq 2.0.0. 4476 # 4477 # @param backlog [Integer, #to_int, #to_i] 4478 # @return [void] 4479 def set_backlog(backlog) 4480 raise DestroyedError unless @ptr 4481 self_p = @ptr 4482 backlog = Integer(backlog) 4483 result = ::CZMQ::FFI.zsock_set_backlog(self_p, backlog) 4484 result 4485 end 4486 4487 # Set socket option `backlog`. 4488 # Available from libzmq 2.0.0. 4489 # 4490 # This is the polymorphic version of #set_backlog. 4491 # 4492 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4493 # object reference to use this method on 4494 # @param backlog [Integer, #to_int, #to_i] 4495 # @return [void] 4496 def self.set_backlog(self_p, backlog) 4497 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4498 backlog = Integer(backlog) 4499 result = ::CZMQ::FFI.zsock_set_backlog(self_p, backlog) 4500 result 4501 end 4502 4503 # Set socket option `subscribe`. 4504 # Available from libzmq 2.0.0. 4505 # 4506 # @param subscribe [String, #to_s, nil] 4507 # @return [void] 4508 def set_subscribe(subscribe) 4509 raise DestroyedError unless @ptr 4510 self_p = @ptr 4511 result = ::CZMQ::FFI.zsock_set_subscribe(self_p, subscribe) 4512 result 4513 end 4514 4515 # Set socket option `subscribe`. 4516 # Available from libzmq 2.0.0. 4517 # 4518 # This is the polymorphic version of #set_subscribe. 4519 # 4520 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4521 # object reference to use this method on 4522 # @param subscribe [String, #to_s, nil] 4523 # @return [void] 4524 def self.set_subscribe(self_p, subscribe) 4525 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4526 result = ::CZMQ::FFI.zsock_set_subscribe(self_p, subscribe) 4527 result 4528 end 4529 4530 # Set socket option `unsubscribe`. 4531 # Available from libzmq 2.0.0. 4532 # 4533 # @param unsubscribe [String, #to_s, nil] 4534 # @return [void] 4535 def set_unsubscribe(unsubscribe) 4536 raise DestroyedError unless @ptr 4537 self_p = @ptr 4538 result = ::CZMQ::FFI.zsock_set_unsubscribe(self_p, unsubscribe) 4539 result 4540 end 4541 4542 # Set socket option `unsubscribe`. 4543 # Available from libzmq 2.0.0. 4544 # 4545 # This is the polymorphic version of #set_unsubscribe. 4546 # 4547 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4548 # object reference to use this method on 4549 # @param unsubscribe [String, #to_s, nil] 4550 # @return [void] 4551 def self.set_unsubscribe(self_p, unsubscribe) 4552 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4553 result = ::CZMQ::FFI.zsock_set_unsubscribe(self_p, unsubscribe) 4554 result 4555 end 4556 4557 # Get socket option `type`. 4558 # Available from libzmq 2.0.0. 4559 # 4560 # @return [Integer] 4561 def type() 4562 raise DestroyedError unless @ptr 4563 self_p = @ptr 4564 result = ::CZMQ::FFI.zsock_type(self_p) 4565 result 4566 end 4567 4568 # Get socket option `type`. 4569 # Available from libzmq 2.0.0. 4570 # 4571 # This is the polymorphic version of #type. 4572 # 4573 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4574 # object reference to use this method on 4575 # @return [Integer] 4576 def self.type(self_p) 4577 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4578 result = ::CZMQ::FFI.zsock_type(self_p) 4579 result 4580 end 4581 4582 # Get socket option `rcvmore`. 4583 # Available from libzmq 2.0.0. 4584 # 4585 # @return [Integer] 4586 def rcvmore() 4587 raise DestroyedError unless @ptr 4588 self_p = @ptr 4589 result = ::CZMQ::FFI.zsock_rcvmore(self_p) 4590 result 4591 end 4592 4593 # Get socket option `rcvmore`. 4594 # Available from libzmq 2.0.0. 4595 # 4596 # This is the polymorphic version of #rcvmore. 4597 # 4598 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4599 # object reference to use this method on 4600 # @return [Integer] 4601 def self.rcvmore(self_p) 4602 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4603 result = ::CZMQ::FFI.zsock_rcvmore(self_p) 4604 result 4605 end 4606 4607 # Get socket option `fd`. 4608 # Available from libzmq 2.0.0. 4609 # 4610 # @return [Integer or FFI::Pointer] 4611 def fd() 4612 raise DestroyedError unless @ptr 4613 self_p = @ptr 4614 result = ::CZMQ::FFI.zsock_fd(self_p) 4615 result 4616 end 4617 4618 # Get socket option `fd`. 4619 # Available from libzmq 2.0.0. 4620 # 4621 # This is the polymorphic version of #fd. 4622 # 4623 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4624 # object reference to use this method on 4625 # @return [Integer or FFI::Pointer] 4626 def self.fd(self_p) 4627 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4628 result = ::CZMQ::FFI.zsock_fd(self_p) 4629 result 4630 end 4631 4632 # Get socket option `events`. 4633 # Available from libzmq 2.0.0. 4634 # 4635 # @return [Integer] 4636 def events() 4637 raise DestroyedError unless @ptr 4638 self_p = @ptr 4639 result = ::CZMQ::FFI.zsock_events(self_p) 4640 result 4641 end 4642 4643 # Get socket option `events`. 4644 # Available from libzmq 2.0.0. 4645 # 4646 # This is the polymorphic version of #events. 4647 # 4648 # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil] 4649 # object reference to use this method on 4650 # @return [Integer] 4651 def self.events(self_p) 4652 self_p = self_p.__ptr if self_p.respond_to?(:__ptr) 4653 result = ::CZMQ::FFI.zsock_events(self_p) 4654 result 4655 end 4656 4657 # Self test of this class. 4658 # 4659 # @param verbose [Boolean] 4660 # @return [void] 4661 def self.test(verbose) 4662 verbose = !(0==verbose||!verbose) # boolean 4663 result = ::CZMQ::FFI.zsock_test(verbose) 4664 result 4665 end 4666 end 4667 end 4668end 4669 4670################################################################################ 4671# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 4672# Read the zproject/README.md for information about making permanent changes. # 4673################################################################################ 4674