httpx/sig/selector.rbs
HoneyryderChuck 554957f6ca initial reimplementation of the system resolver, now using getaddrinfo
the ruby `resolver` library does everthing in ruby, and sequentially
(first ipv4 then ipv6 resolution). we already have native for that, and
getaddrinfo should be considered the ideal way to use DNS (potentially
in the future, it becomes the default resolver).
2022-01-16 22:54:56 +02:00

23 lines
593 B
Plaintext

module HTTPX
class Selector
type selectable = Connection | Resolver::Native | Resolver::System
READABLE: Array[Symbol]
WRITABLE: Array[Symbol]
@selectables: Array[selectable]
def register: (selectable io) -> void
def deregister: (selectable io) -> void
def select: (Numeric? interval) { (selectable) -> void } -> void
private
def initialize: () -> untyped
def select_many: (Numeric? interval) { (selectable) -> void } -> void
def select_one: (Numeric? interval) { (selectable) -> void } -> void
end
type io_interests = :r | :w | :rw
end