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
scheduler.c
View on GitHub ↗
VALUE
rb_fiber_scheduler_address_resolve(VALUE scheduler, VALUE hostname)
{
VALUE arguments[] = {
hostname
};
return rb_check_funcall(scheduler, id_address_resolve, 1, arguments);
}
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:
-
Addrinfo.marshal_load
-
TCPSocket.gethostbyname
-
Socket.gethostbyname