async-htty 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/htty/protocol/htty/server.rb +3 -2
- data/lib/async/htty/protocol/htty.rb +6 -2
- data/lib/async/htty/server.rb +1 -1
- data/lib/async/htty/version.rb +1 -1
- data/readme.md +5 -0
- data/releases.md +5 -0
- data/test/async/htty/protocol/htty.rb +6 -4
- data/test/async/htty/server.rb +2 -2
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9d7783c87883c9c45dd3d05a11b2060fea115b7a1b5a2435bcb3ebe3a2f0bb06
|
|
4
|
+
data.tar.gz: 235ff150ef9cf4966538b2899a2471df665544606d8599345f62f863772d6632
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: af3056573867c1b572c48a713c28a07cfa7d33d363d1a5c94ef555faee4dfae35e8aeb482ed5d14cd70c11cdcf5bc78d6a5e1296c9f3b61eb4ad958f674b3166
|
|
7
|
+
data.tar.gz: 97bf7592db90bc2df78b28e39f04ea14d53ea725443e56693c3f5daf5661e2b8ce018b6e2fb5692991619a0d5dc0fc676f291131e3291931c23f1b02c71d2b55
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -13,7 +13,11 @@ module Async
|
|
|
13
13
|
module Protocol
|
|
14
14
|
module HTTY
|
|
15
15
|
def self.client(stream, settings: ::Async::HTTP::Protocol::HTTP2::CLIENT_SETTINGS)
|
|
16
|
-
|
|
16
|
+
mode = stream.read_bootstrap
|
|
17
|
+
|
|
18
|
+
unless mode == ::Protocol::HTTY::Stream::RAW_MODE
|
|
19
|
+
raise ::Protocol::HTTY::ProtocolError, "Expected HTTY bootstrap mode #{::Protocol::HTTY::Stream::RAW_MODE.inspect}, got #{mode.inspect}"
|
|
20
|
+
end
|
|
17
21
|
|
|
18
22
|
client = ::Async::HTTP::Protocol::HTTP2::Client.new(stream)
|
|
19
23
|
client.send_connection_preface(settings)
|
|
@@ -23,7 +27,7 @@ module Async
|
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
def self.server(stream, settings: ::Async::HTTP::Protocol::HTTP2::SERVER_SETTINGS)
|
|
26
|
-
stream
|
|
30
|
+
stream.write_bootstrap
|
|
27
31
|
|
|
28
32
|
server = Server.new(stream)
|
|
29
33
|
server.read_connection_preface(settings)
|
data/lib/async/htty/server.rb
CHANGED
|
@@ -45,7 +45,7 @@ module Async
|
|
|
45
45
|
original_output = output.dup
|
|
46
46
|
original_error = error.dup
|
|
47
47
|
|
|
48
|
-
stream = ::
|
|
48
|
+
stream = ::Protocol::HTTY::Stream.new(original_input, original_output)
|
|
49
49
|
input.reopen(File::NULL)
|
|
50
50
|
output.reopen(File::NULL)
|
|
51
51
|
error.reopen(File::NULL)
|
data/lib/async/htty/version.rb
CHANGED
data/readme.md
CHANGED
|
@@ -14,6 +14,11 @@ Please see the [project documentation](https://socketry.github.io/async-htty/) f
|
|
|
14
14
|
|
|
15
15
|
Please see the [project releases](https://socketry.github.io/async-htty/releases/index) for all releases.
|
|
16
16
|
|
|
17
|
+
### v0.3.0
|
|
18
|
+
|
|
19
|
+
- Pass explicit terminal input and output endpoints into `Protocol::HTTY::Stream`, avoiding buffered duplex reads across the HTTY HTTP/2 transport.
|
|
20
|
+
- Expect the HTTY protocol adapter to receive a prepared `Protocol::HTTY::Stream` instance before performing bootstrap and HTTP/2 setup.
|
|
21
|
+
|
|
17
22
|
### v0.2.1
|
|
18
23
|
|
|
19
24
|
- Send a server-side GOAWAY when the HTTY client closes an HTTP/2 session, allowing terminal clients to detach cleanly.
|
data/releases.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v0.3.0
|
|
4
|
+
|
|
5
|
+
- Pass explicit terminal input and output endpoints into `Protocol::HTTY::Stream`, avoiding buffered duplex reads across the HTTY HTTP/2 transport.
|
|
6
|
+
- Expect the HTTY protocol adapter to receive a prepared `Protocol::HTTY::Stream` instance before performing bootstrap and HTTP/2 setup.
|
|
7
|
+
|
|
3
8
|
## v0.2.1
|
|
4
9
|
|
|
5
10
|
- Send a server-side GOAWAY when the HTTY client closes an HTTP/2 session, allowing terminal clients to detach cleanly.
|
|
@@ -65,11 +65,11 @@ describe Async::HTTY::Protocol::HTTY do
|
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
def client_stream(pipes)
|
|
68
|
-
|
|
68
|
+
Protocol::HTTY::Stream.new(pipes[:client_input], pipes[:client_output])
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
def server_stream(pipes)
|
|
72
|
-
|
|
72
|
+
Protocol::HTTY::Stream.new(pipes[:server_input], pipes[:server_output])
|
|
73
73
|
end
|
|
74
74
|
|
|
75
75
|
def spawn_fixture(name)
|
|
@@ -123,7 +123,8 @@ describe Async::HTTY::Protocol::HTTY do
|
|
|
123
123
|
payload = (0x00..0xff).to_a.pack("C*")
|
|
124
124
|
|
|
125
125
|
with_fixture("echo_body.rb") do |stream|
|
|
126
|
-
Protocol::HTTY::Stream.new(stream)
|
|
126
|
+
stream = Protocol::HTTY::Stream.new(stream.input, stream.output)
|
|
127
|
+
stream.read_bootstrap
|
|
127
128
|
|
|
128
129
|
framer = Protocol::HTTP2::Framer.new(stream)
|
|
129
130
|
client = EchoClient.new(framer)
|
|
@@ -174,7 +175,8 @@ describe Async::HTTY::Protocol::HTTY do
|
|
|
174
175
|
server_finished.signal
|
|
175
176
|
end
|
|
176
177
|
|
|
177
|
-
stream =
|
|
178
|
+
stream = client_stream(pipes)
|
|
179
|
+
stream.read_bootstrap
|
|
178
180
|
framer = Protocol::HTTP2::Framer.new(stream)
|
|
179
181
|
client = Protocol::HTTP2::Client.new(framer)
|
|
180
182
|
client.send_connection_preface
|
data/test/async/htty/server.rb
CHANGED
|
@@ -88,8 +88,8 @@ describe Async::HTTY::Server do
|
|
|
88
88
|
|
|
89
89
|
protocol.define_singleton_method(:server) do |stream|
|
|
90
90
|
reopened_to_null = [input.reopened_to_null?, output.reopened_to_null?, error.reopened_to_null?]
|
|
91
|
-
duplex_input = stream.
|
|
92
|
-
duplex_output = stream.
|
|
91
|
+
duplex_input = stream.input
|
|
92
|
+
duplex_output = stream.output
|
|
93
93
|
|
|
94
94
|
stream.write("response", flush: true)
|
|
95
95
|
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: async-htty
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
@@ -86,14 +86,14 @@ dependencies:
|
|
|
86
86
|
requirements:
|
|
87
87
|
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '0.
|
|
89
|
+
version: '0.3'
|
|
90
90
|
type: :runtime
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '0.
|
|
96
|
+
version: '0.3'
|
|
97
97
|
executables: []
|
|
98
98
|
extensions: []
|
|
99
99
|
extra_rdoc_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|