Class: IPSocket

Inherits:
Object
  • Object
show all
Defined in:
lib/resolv-replace.rb

Direct Known Subclasses

TCPSocket, UDPSocket

Class Method Summary collapse

Class Method Details

.getaddress(host) ⇒ Object

:startdoc:



10
11
12
13
14
15
16
# File 'lib/resolv-replace.rb', line 10

def getaddress(host)
  begin
    return Resolv.getaddress(host).to_s
  rescue Resolv::ResolvError
    raise SocketError, "Hostname not known: #{host}"
  end
end

.original_resolv_getaddressObject

:stopdoc:



8
# File 'lib/resolv-replace.rb', line 8

alias original_resolv_getaddress getaddress