Skip to content

Commit ebbd155

Browse files
committed
move Peer to protocol-http gem.
1 parent 67bf1cf commit ebbd155

File tree

4 files changed

+7
-39
lines changed

4 files changed

+7
-39
lines changed

async-http.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
2828
spec.add_dependency "async-pool", "~> 0.9"
2929
spec.add_dependency "io-endpoint", "~> 0.14"
3030
spec.add_dependency "io-stream", "~> 0.6"
31-
spec.add_dependency "protocol-http", "~> 0.37"
31+
spec.add_dependency "protocol-http", "~> 0.43"
3232
spec.add_dependency "protocol-http1", ">= 0.28.1"
3333
spec.add_dependency "protocol-http2", "~> 0.19"
3434
spec.add_dependency "traces", "~> 0.10"

lib/async/http/protocol/http1/connection.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
# Released under the MIT License.
44
# Copyright, 2018-2024, by Samuel Williams.
55

6-
require "protocol/http1"
7-
8-
require_relative "../peer"
96
require_relative "request"
107
require_relative "response"
118

9+
require "protocol/http1"
10+
require "protocol/http/peer"
11+
1212
module Async
1313
module HTTP
1414
module Protocol
@@ -43,7 +43,7 @@ def http2?
4343
end
4444

4545
def peer
46-
@peer ||= Peer.for(@stream.io)
46+
@peer ||= Protocol::HTTP::Peer.for(@stream.io)
4747
end
4848

4949
attr :count

lib/async/http/protocol/http2/connection.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# Copyright, 2020, by Bruno Sutic.
66

77
require_relative "stream"
8-
require_relative "../peer"
98

9+
require "protocol/http/peer"
1010
require "async/semaphore"
1111

1212
module Async
@@ -113,7 +113,7 @@ def read_in_background(parent: Task.current)
113113
attr :promises
114114

115115
def peer
116-
@peer ||= Peer.for(@stream.io)
116+
@peer ||= Protocol::HTTP::Peer.for(@stream.io)
117117
end
118118

119119
attr :count

lib/async/http/protocol/peer.rb

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)