Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

Fiber::Scheduler#address_resolve

address_resolve(hostname) → array_of_strings or nil

Invoked by any method that performs a non-reverse DNS lookup. The most notable method is Addrinfo.getaddrinfo, but there are many other.

The method is expected to return an array of strings corresponding to ip addresses the hostname is resolved to, or nil if it can not be resolved.

Fairly exhaustive list of all possible call-sites:

See also #block #blocking_operation_wait also in 4.0 · 3.4 · 3.3 · 3.2