sig/connection.rbs in httpx-0.22.5 vs sig/connection.rbs in httpx-0.23.0

- old
+ new

@@ -15,13 +15,11 @@ end extend Forwardable include Loggable include Callbacks - include HTTPX::Registry[String, Class] - BUFFER_SIZE: Integer attr_reader type: io_type attr_reader origin: URI::Generic attr_reader origins: Array[String] attr_reader state: Symbol @@ -34,11 +32,17 @@ @window_size: Integer @read_buffer: Buffer @write_buffer: Buffer @inflight: Integer @keep_alive_timeout: Numeric? + @timeout: Numeric? + @current_timeout: Numeric? @total_timeout: Numeric? + @io: TCP | SSL | UNIX + @parser: HTTP1 | HTTP2 | _Parser + @connected_at: Float + @response_received_at: Float def addresses: () -> Array[ipaddr]? def addresses=: (Array[ipaddr]) -> void @@ -75,10 +79,12 @@ def timeout: () -> Numeric? def deactivate: () -> void + def open?: () -> bool + def raise_timeout_error: (Numeric interval) -> void private def initialize: (io_type, URI::Generic, options) -> untyped @@ -89,21 +95,24 @@ def consume: () -> void def send_pending: () -> void - def parser: () -> _Parser + def parser: () -> (HTTP1 | HTTP2 | _Parser) def send_request_to_parser: (Request request) -> void - def build_parser: () -> _Parser - | (String) -> _Parser + def build_parser: (?String protocol) -> (HTTP1 | HTTP2) - def set_parser_callbacks: (_Parser) -> void + def set_parser_callbacks: (HTTP1 | HTTP2 parser) -> void def transition: (Symbol) -> void + def handle_transition: (Symbol) -> void + + def build_socket: (?Array[ipaddr]? addrs) -> (TCP | SSL | UNIX) + def on_error: (HTTPX::TimeoutError | Error | StandardError) -> void def handle_error: (StandardError) -> void def purge_after_closed: () -> void @@ -111,7 +120,9 @@ def set_request_timeouts: (Request request) -> void def write_timeout_callback: (Request request, Numeric write_timeout) -> void def read_timeout_callback: (Request request, Numeric read_timeout, ?singleton(RequestTimeoutError) error_type) -> void + + def self.parser_type: (String protocol) -> (singleton(HTTP1) | singleton(HTTP2)) end end \ No newline at end of file