Class: Resolv

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

Overview

Now override the override with EM-aware functions

Instance Method Summary collapse

Instance Method Details

#getaddress(host) ⇒ Object



13
14
15
# File 'lib/em-resolv-replace.rb', line 13

def getaddress(host)
  EM.reactor_running? ? em_getaddresses(host)[0] : orig_getaddress(host)
end

#getaddresses(host) ⇒ Object



19
20
21
# File 'lib/em-resolv-replace.rb', line 19

def getaddresses(host)
  EM.reactor_running? ? em_getaddresses(host) : orig_getaddresses(host)
end

#getname(address) ⇒ Object



25
26
27
# File 'lib/em-resolv-replace.rb', line 25

def getname(address)
  EM.reactor_running? ? em_getnames(address)[0] : orig_getname(address)
end

#getnames(address) ⇒ Object



31
32
33
# File 'lib/em-resolv-replace.rb', line 31

def getnames(address)
  EM.reactor_running? ? em_getnames(address) : orig_getnames(address)
end

#orig_getaddressObject



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

alias :orig_getaddress :getaddress

#orig_getaddressesObject



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

alias :orig_getaddresses :getaddresses

#orig_getnameObject



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

alias :orig_getname :getname

#orig_getnamesObject



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

alias :orig_getnames :getnames