class Async::Scheduler

def address_resolve(hostname)

@parameter hostname [String] The hostname to resolve.

@asynchronous May be non-blocking.
@public Since *Async v2*.

Resolve the address of the given hostname.
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