lib/async/http/protocol/http1/connection.rb in async-http-0.82.3 vs lib/async/http/protocol/http1/connection.rb in async-http-0.83.0
- old
+ new
@@ -1,15 +1,16 @@
# frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2018-2024, by Samuel Williams.
-require "protocol/http1"
-
require_relative "request"
require_relative "response"
+require "protocol/http1"
+require "protocol/http/peer"
+
module Async
module HTTP
module Protocol
module HTTP1
class Connection < ::Protocol::HTTP1::Connection
@@ -40,10 +41,10 @@
def http2?
false
end
def peer
- @stream.io
+ @peer ||= Protocol::HTTP::Peer.for(@stream.io)
end
attr :count
def concurrency