From 2792acc8f29c6ee1d04b57b7b70d43519a0ceda8 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Mon, 14 Jun 2021 16:21:08 +1200 Subject: Add scheduler hook `Addrinfo.getaddrinfo`. (#4375) Co-authored-by: Bruno Sutic --- doc/fiber.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/fiber.md b/doc/fiber.md index 840bebd188..9baab4e4d1 100644 --- a/doc/fiber.md +++ b/doc/fiber.md @@ -90,6 +90,13 @@ class Scheduler def timeout_after(duration, klass, *arguments, &block) end + # Resolve hostname to an array of IP addresses. + # This hook is optional. + # @parameter hostname [String] Example: "www.ruby-lang.org". + # @returns [Array] An array of IPv4 and/or IPv6 address strings that the hostname resolves to. + def address_resolve(hostname) + end + # Block the calling fiber. # @parameter blocker [Object] What we are waiting on, informational only. # @parameter timeout [Numeric | Nil] The amount of time to wait for in seconds. -- cgit v1.2.3