Module: CZTop::PolymorphicZsockMethods

Included in:
Actor, Socket
Defined in:
lib/cztop/polymorphic_zsock_methods.rb

Overview

These are methods that can be used on a Socket as well as an Actor.

Instance Method Summary collapse

Instance Method Details

#set_unboundedObject

Set socket to use unbounded pipes (HWM=0); use this in cases when you are totally certain the message volume can fit in memory.



24
25
26
# File 'lib/cztop/polymorphic_zsock_methods.rb', line 24

def set_unbounded
  ::CZMQ::FFI::Zsock.set_unbounded(ffi_delegate)
end

#signal(status = 0) ⇒ Object

Sends a signal.

Parameters:

  • status (Integer) (defaults to: 0)

    signal (0-255)



10
11
12
# File 'lib/cztop/polymorphic_zsock_methods.rb', line 10

def signal(status = 0)
  ::CZMQ::FFI::Zsock.signal(ffi_delegate, status)
end

#waitInteger

Waits for a signal.

Returns:

  • (Integer)

    the received signal



17
18
19
# File 'lib/cztop/polymorphic_zsock_methods.rb', line 17

def wait
  ::CZMQ::FFI::Zsock.wait(ffi_delegate)
end