mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-05 00:02:38 -04:00
66 lines
1.8 KiB
Plaintext
66 lines
1.8 KiB
Plaintext
module HTTPX
|
|
module Resolver
|
|
class Resolver
|
|
include Callbacks
|
|
include Loggable
|
|
|
|
include _Selectable
|
|
|
|
RECORD_TYPES: Hash[ip_family, singleton(Resolv::DNS::Resource)]
|
|
|
|
FAMILY_TYPES: Hash[singleton(Resolv::DNS::Resource), String]
|
|
|
|
attr_reader family: ip_family
|
|
|
|
attr_reader options: Options
|
|
|
|
attr_writer current_selector: Selector?
|
|
|
|
attr_writer current_session: Session?
|
|
|
|
attr_accessor multi: Multi?
|
|
|
|
@record_type: singleton(Resolv::DNS::Resource)
|
|
@resolver_options: Hash[Symbol, untyped]
|
|
@system_resolver: Resolv::Hosts
|
|
@connections: Array[Connection]
|
|
|
|
def close: () -> void
|
|
|
|
alias terminate close
|
|
|
|
def closed?: () -> bool
|
|
|
|
def empty?: () -> bool
|
|
|
|
def each_connection: () { (Connection connection) -> void } -> void
|
|
|
|
def emit_addresses: (Connection connection, ip_family family, Array[IPAddr], ?bool early_resolve) -> void
|
|
|
|
def self.multi?: () -> bool
|
|
|
|
private
|
|
|
|
def resolve: (?Connection connection, ?String hostname) -> void
|
|
|
|
def emit_resolved_connection: (Connection connection, Array[IPAddr] addresses, bool early_resolve) -> void
|
|
|
|
def initialize: (ip_family family, Options options) -> void
|
|
|
|
def early_resolve: (Connection connection, ?hostname: String) -> bool
|
|
|
|
def set_resolver_callbacks: () -> void
|
|
|
|
def resolve_connection: (Connection connection) -> void
|
|
|
|
def emit_connection_error: (Connection connection, StandardError error) -> void
|
|
|
|
def close_resolver: (Resolver resolver) -> void
|
|
|
|
def emit_resolve_error: (Connection connection, ?String hostname, ?StandardError) -> void
|
|
|
|
def resolve_error: (String hostname, ?StandardError?) -> (ResolveError | ResolveTimeoutError)
|
|
end
|
|
end
|
|
end
|