sig/resolver/native.rbs in httpx-0.15.4 vs sig/resolver/native.rbs in httpx-0.16.0
- old
+ new
@@ -1,11 +1,15 @@
module HTTPX
module Resolver
class Native
+ extend Forwardable
include ResolverMixin
include _ToIO
+ DEFAULTS: Hash[Symbol, untyped]
+ DNS_PORT: Integer
+
@options: Options
@ns_index: Integer
@resolver_options: Hash[Symbol, untyped]
@nameserver: String
@_timeouts: Array[Numeric]
@@ -13,11 +17,11 @@
@_record_types: Hash[String, Hash["A" | "AAAA", dns_resource]]
@connections: Array[Connection]
@queries: Hash[String, Connection]
@read_buffer: String
@write_buffer: Buffer
- @state: :idle | :closed
+ @state: :idle | :open | :closed
def closed?: () -> bool
def empty?: () -> bool
@@ -33,10 +37,12 @@
private
def initialize: (options) -> untyped
+ def calculate_interests: () -> (:r | :w)
+
def consume: () -> void
def do_retry: () -> void
def dread: (Integer) -> void
@@ -44,17 +50,15 @@
def dwrite: () -> void
def parse: (String) -> void
- def resolve: (Connection, String hostname) -> void
- | (Connection) -> void
- | () -> void
+ def resolve: (?Connection connection, ?String hostname) -> void
def build_socket: () -> void
def transition: (Symbol nextstate) -> void
- def handle_error: (StandardError) -> void
+ def handle_error: (NativeResolveError | StandardError) -> void
end
end
end
\ No newline at end of file