Module: ZMQ::IdentitySupport

Included in:
Socket
Defined in:
lib/ffi-rzmq/socket.rb

Instance Method Summary collapse

Instance Method Details

#identityObject

Convenience method for getting the value of the socket IDENTITY.



526
527
528
529
530
# File 'lib/ffi-rzmq/socket.rb', line 526

def identity
  array = []
  getsockopt IDENTITY, array
  array.at(0)
end

#identity=(value) ⇒ Object

Convenience method for setting the value of the socket IDENTITY.



534
535
536
# File 'lib/ffi-rzmq/socket.rb', line 534

def identity=(value)
  setsockopt IDENTITY, value.to_s
end