Method: Async::Scheduler#address_resolve
- Defined in:
- lib/async/scheduler.rb
permalink #address_resolve(hostname) ⇒ Object
Resolve the address of the given hostname.
265 266 267 268 269 270 |
# File 'lib/async/scheduler.rb', line 265 def address_resolve(hostname) # On some platforms, hostnames may contain a device-specific suffix (e.g. %en0). We need to strip this before resolving. # See <https://github.com/socketry/async/issues/180> for more details. hostname = hostname.split("%", 2).first ::Resolv.getaddresses(hostname) end |