sig/connection/http2.rbs in httpx-0.16.1 vs sig/connection/http2.rbs in httpx-0.17.0

- old
+ new

@@ -1,14 +1,17 @@ module HTTPX class Connection::HTTP2 include Callbacks include Loggable + MAX_CONCURRENT_REQUESTS: Integer + attr_reader streams: Hash[Request, HTTP2Next::Stream] attr_reader pending: Array[Request] @options: Options + @settings: Hash[Symbol, Integer | bool] @max_concurrent_requests: Integer @max_requests: Integer @drains: Hash[Request, String] @pings: Array[String] @buffer: Buffer @@ -21,11 +24,11 @@ def exhausted?: () -> bool def <<: (String) -> void - def can_buffer_more_requests: () -> bool + def can_buffer_more_requests?: () -> bool def send: (Request) -> void def consume: () -> void @@ -33,21 +36,21 @@ def ping: () -> void alias reset init_connection - def timeout: () -> Integer + def timeout: () -> Numeric private def initialize: (Buffer, options) -> untyped def send_pending: () -> void def headline_uri: (Request) -> String - def set_protocol_headers: (Request) -> _Each[[headers_key, String]] + def set_protocol_headers: (Request) -> _Each[[String, String]] def handle: (Request request, HTTP2Next::Stream stream) -> void def init_connection: () -> void @@ -59,27 +62,35 @@ def join_body: (HTTP2Next::Stream stream, Request request) -> void def on_stream_headers: (HTTP2Next::Stream stream, Request request, Array[[String, String]] headers) -> void - def on_stream_trailers: (HTTP2Next::Stream stream, Request request, Array[[String, String]] headers) -> void + def on_stream_trailers: (HTTP2Next::Stream stream, Response response, Array[[String, String]] headers) -> void - def on_stream_data: (HTTP2Next::Stream stream, Request request, string data) -> void + def on_stream_data: (HTTP2Next::Stream stream, Request request, String data) -> void + def on_stream_refuse: (HTTP2Next::Stream stream, Request request, StandardError error) -> void + def on_stream_close: (HTTP2Next::Stream stream, Request request, (Symbol | StandardError)? error) -> void def on_frame: (string bytes) -> void def on_settings: (*untyped) -> void def on_close: (Integer last_frame, Symbol? error, String? payload) -> void def on_frame_sent: (HTTP2Next::frame) -> void + def on_frame_received: (HTTP2Next::frame) -> void + def on_altsvc: (String origin, HTTP2Next::frame) -> void + def on_promise: (HTTP2Next::Stream) -> void def on_origin: (String) -> void def on_pong: (string ping) -> void + + class Error < ::HTTPX::Error + end end end \ No newline at end of file