Method: Async::Scheduler#address_resolve
- Defined in:
- lib/async/scheduler.rb
#address_resolve(hostname) ⇒ Object
Resolve the address of the given hostname.
294 295 296 297 298 299 |
# File 'lib/async/scheduler.rb', line 294 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 |