Class: Resolv
- Inherits:
-
Object
- Object
- Resolv
- Defined in:
- lib/em-resolv-replace.rb
Overview
Now override the override with EM-aware functions
Instance Method Summary collapse
- #getaddress(host) ⇒ Object
- #getaddresses(host) ⇒ Object
- #getname(address) ⇒ Object
- #getnames(address) ⇒ Object
- #orig_getaddress ⇒ Object
- #orig_getaddresses ⇒ Object
- #orig_getname ⇒ Object
- #orig_getnames ⇒ Object
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_getaddress ⇒ Object
11 |
# File 'lib/em-resolv-replace.rb', line 11 alias :orig_getaddress :getaddress |
#orig_getaddresses ⇒ Object
17 |
# File 'lib/em-resolv-replace.rb', line 17 alias :orig_getaddresses :getaddresses |
#orig_getname ⇒ Object
23 |
# File 'lib/em-resolv-replace.rb', line 23 alias :orig_getname :getname |
#orig_getnames ⇒ Object
29 |
# File 'lib/em-resolv-replace.rb', line 29 alias :orig_getnames :getnames |