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.



302
303
304
305
306
# File 'lib/ffi-rzmq/socket.rb', line 302

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

#identity=(value) ⇒ Object

Convenience method for setting the value of the socket IDENTITY.



310
311
312
# File 'lib/ffi-rzmq/socket.rb', line 310

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