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:



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

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:



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

alias original_resolv_getaddress getaddress