lib/async/http/protocol/http2.rb in async-http-0.66.2 vs lib/async/http/protocol/http2.rb in async-http-0.67.0

- old
+ new

@@ -1,14 +1,15 @@ # frozen_string_literal: true # Released under the MIT License. # Copyright, 2018-2024, by Samuel Williams. +# Copyright, 2023, by Thomas Morgan. require_relative 'http2/client' require_relative 'http2/server' -require 'io/stream/buffered' +require 'io/stream' module Async module HTTP module Protocol module HTTP2 @@ -35,20 +36,20 @@ ::Protocol::HTTP2::Settings::INITIAL_WINDOW_SIZE => 0x800000, ::Protocol::HTTP2::Settings::ENABLE_CONNECT_PROTOCOL => 1, } def self.client(peer, settings = CLIENT_SETTINGS) - stream = ::IO::Stream::Buffered.wrap(peer) + stream = ::IO::Stream(peer) client = Client.new(stream) client.send_connection_preface(settings) client.start_connection return client end def self.server(peer, settings = SERVER_SETTINGS) - stream = ::IO::Stream::Buffered.wrap(peer) + stream = ::IO::Stream(peer) server = Server.new(stream) server.read_connection_preface(settings) server.start_connection