Class: Socket::Servent

Inherits:
Struct
  • Object
show all
Defined in:
lib/rubysl/socket.rb

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Servent

Returns a new instance of Servent.



929
930
931
932
933
# File 'lib/rubysl/socket.rb', line 929

def initialize(data)
  @p = FFI::MemoryPointer.new data.bytesize
  @p.write_string(data, data.bytesize)
  super(@p)
end

Instance Method Details

#to_sObject



935
936
937
# File 'lib/rubysl/socket.rb', line 935

def to_s
  @p.read_string(size)
end