Module: XS::IdentitySupport

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

Instance Method Summary collapse

Instance Method Details

#identityObject

Convenience method for getting the value of the socket IDENTITY.

Returns:

  • identity



603
604
605
606
607
# File 'lib/ffi-rxs/socket.rb', line 603

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

#identity=(value) ⇒ Object

Convenience method for setting the value of the socket IDENTITY.

Parameters:

  • value


612
613
614
# File 'lib/ffi-rxs/socket.rb', line 612

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