httpx/sig/resolver/native.rbs
HoneyryderChuck 6b61b8ccdb fixing signatures
also adding some checks on code, in order for steep to stop complaining
about potential nil returns.
2021-08-10 10:28:58 +01:00

66 lines
1.4 KiB
Plaintext

module HTTPX
module Resolver
class Native
extend Forwardable
include ResolverMixin
include _ToIO
type state = :idle | :open | :closed
DEFAULTS: Hash[Symbol, untyped]
DNS_PORT: Integer
@options: Options
@ns_index: Integer
@resolver_options: Hash[Symbol, untyped]
@nameserver: String
@_timeouts: Array[Numeric]
@timeouts: Hash[String, Array[Numeric]]
@_record_types: Hash[String, Hash["A" | "AAAA", dns_resource]]
@connections: Array[Connection]
@queries: Hash[String, Connection]
@read_buffer: String
@write_buffer: Buffer
@state: state
def closed?: () -> bool
def empty?: () -> bool
def close: () -> void
def call: () -> void
def interests: () -> io_interests
def <<: (Connection) -> void
def timeout: () -> Numeric?
private
def initialize: (options) -> untyped
def calculate_interests: () -> (:r | :w)
def consume: () -> void
def do_retry: () -> void
def dread: (Integer) -> void
| () -> void
def dwrite: () -> void
def parse: (String) -> void
def resolve: (?Connection connection, ?String hostname) -> void
def build_socket: () -> void
def transition: (state nextstate) -> void
def handle_error: (NativeResolveError | StandardError) -> void
end
end
end