async-websocket 0.30.0 → 0.30.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65d7e723e07e05a813e668c1e4a3dfb82213b1b76955d2e1c8d7f8bcd338de8a
4
- data.tar.gz: cbfe2bc3be018398c2c5787052cf5e381a10c3d8695a324be386cb7aef20f0df
3
+ metadata.gz: cc19baa7afd149bb5ce06a3142aa1562c7eb213d1e164941866889315a0776fc
4
+ data.tar.gz: 57e18b774d72e2a050aa4347f5e7563b0f7c1dada9de18fd274b878be7d78c10
5
5
  SHA512:
6
- metadata.gz: 9973e91dc44e1a8e072acd3f9c7c8fb999d62f3c0fc9a4e0e4e45558453e3f780838ed30e7a7216094afe059a5eb9831b06e0a36b92ec5ff5126f94eec8b46c5
7
- data.tar.gz: bde87b0d45786863bf68c4c6d463fbc102ab2e3a0fa12c7fff9f346f5594858065d72ae6ee3b2bcfeb9289c1432681fb62f2350abc65d52257b62658ab3186bc
6
+ metadata.gz: 8325d60461583004ef04d4adb478e26bcc2f7b931bf4c6eb93c4bc21e19b20fcabc98c0f5431f93302c93769535f398a3c0ae012ade5de3751fd895b2f2e14c8
7
+ data.tar.gz: 908d28abf3ee093bdf568a177bd40d645ea32608a27d1609ef36201971538885f65559ec41d393a0e146a258e3dbf2e0959af5267dc02ea1c36b97958231f9cd
@@ -0,0 +1,91 @@
1
+ # Getting Started
2
+
3
+ This guide shows you how to implement a basic client and server.
4
+
5
+ ## Installation
6
+
7
+ Add the gem to your project:
8
+
9
+ ~~~ bash
10
+ $ bundle add async-websocket
11
+ ~~~
12
+
13
+ ## Overview Video
14
+
15
+ <content:youtube-video id="aHop4Yyjs_o" />
16
+
17
+ ## Client Implementation
18
+
19
+ ~~~ ruby
20
+ #!/usr/bin/env ruby
21
+
22
+ require 'async'
23
+ require 'async/http/endpoint'
24
+ require 'async/websocket/client'
25
+
26
+ USER = ARGV.pop || "anonymous"
27
+ URL = ARGV.pop || "http://localhost:7070"
28
+
29
+ Async do |task|
30
+ endpoint = Async::HTTP::Endpoint.parse(URL)
31
+
32
+ Async::WebSocket::Client.connect(endpoint) do |connection|
33
+ input_task = task.async do
34
+ while line = $stdin.gets
35
+ connection.write({user: USER, text: line})
36
+ connection.flush
37
+ end
38
+ end
39
+
40
+ # Generate a text message by geneating a JSON payload from a hash:
41
+ connection.write(Protocol::WebSocket::TextMessage.generate({
42
+ user: USER,
43
+ status: "connected",
44
+ }))
45
+
46
+ while message = connection.read
47
+ puts message.inspect
48
+ end
49
+ ensure
50
+ input_task&.stop
51
+ end
52
+ end
53
+ ~~~
54
+
55
+ ### Force HTTP/1 Connection
56
+
57
+ This forces the endpoint to connect using `HTTP/1.1`.
58
+
59
+ ~~~ ruby
60
+ endpoint = Async::HTTP::Endpoint.parse("https://remote-server.com", alpn_protocols: Async::HTTP::Protocol::HTTP11.names)
61
+
62
+ Async::WebSocket::Client.connect(endpoint) do ...
63
+ ~~~
64
+
65
+ You may want to use this if the server advertises `HTTP/2` but doesn't support `HTTP/2` for WebSocket connections.
66
+
67
+ ## Server Side with Rack & Falcon
68
+
69
+ ~~~ ruby
70
+ #!/usr/bin/env -S falcon serve --bind http://localhost:7070 --count 1 -c
71
+
72
+ require 'async/websocket/adapters/rack'
73
+ require 'set'
74
+
75
+ $connections = Set.new
76
+
77
+ run lambda {|env|
78
+ Async::WebSocket::Adapters::Rack.open(env, protocols: ['ws']) do |connection|
79
+ $connections << connection
80
+
81
+ while message = connection.read
82
+ $connections.each do |connection|
83
+ connection.write(message)
84
+ connection.flush
85
+ end
86
+ end
87
+ ensure
88
+ $connections.delete(connection)
89
+ end or [200, {}, ["Hello World"]]
90
+ }
91
+ ~~~
@@ -0,0 +1,15 @@
1
+ # Automatically generated context index for Utopia::Project guides.
2
+ # Do not edit then files in this directory directly, instead edit the guides and then run `bake utopia:project:agent:context:update`.
3
+ ---
4
+ description: An async websocket library on top of protocol-websocket.
5
+ metadata:
6
+ documentation_uri: https://socketry.github.io/async-websocket/
7
+ funding_uri: https://github.com/sponsors/ioquatix
8
+ source_code_uri: https://github.com/socketry/async-websocket.git
9
+ files:
10
+ - path: getting-started.md
11
+ title: Getting Started
12
+ description: This guide shows you how to implement a basic client and server.
13
+ - path: rails-integration.md
14
+ title: Rails Integration
15
+ description: This guide explains how to use `async-websocket` with Rails.
@@ -0,0 +1,121 @@
1
+ # Rails Integration
2
+
3
+ This guide explains how to use `async-websocket` with Rails.
4
+
5
+ ## Project Setup
6
+
7
+ Firstly, we will create a new project for the purpose of this guide:
8
+
9
+ ~~~ bash
10
+ $ rails new websockets
11
+ --- snip ---
12
+ ~~~
13
+
14
+ Then, we need to add the `Async::WebSocket` gem:
15
+
16
+ ~~~ bash
17
+ $ bundle add async-websocket
18
+ ~~~
19
+
20
+ ## Adding the WebSocket Controller
21
+
22
+ Firstly, generate the controller with a single method:
23
+
24
+ ~~~ bash
25
+ $ rails generate controller home index
26
+ ~~~
27
+
28
+ Then edit your controller implementation:
29
+
30
+ ~~~ ruby
31
+ require 'async/websocket/adapters/rails'
32
+
33
+ class HomeController < ApplicationController
34
+ # WebSocket clients may not send CSRF tokens, so we need to disable this check.
35
+ skip_before_action :verify_authenticity_token, only: [:index]
36
+
37
+ def index
38
+ self.response = Async::WebSocket::Adapters::Rails.open(request) do |connection|
39
+ message = Protocol::WebSocket::TextMessage.generate({message: "Hello World"})
40
+ connection.write(message)
41
+ end
42
+ end
43
+ end
44
+ ~~~
45
+
46
+ ### Testing
47
+
48
+ You can quickly test that the above controller is working. First, start the Rails server:
49
+
50
+ ~~~ bash
51
+ $ rails s
52
+ => Booting Puma
53
+ => Rails 7.2.0.beta2 application starting in development
54
+ => Run `bin/rails server --help` for more startup options
55
+ ~~~
56
+
57
+ Then you can connect to the server using a WebSocket client:
58
+
59
+ ~~~ bash
60
+ $ websocat ws://localhost:3000/home/index
61
+ {"message":"Hello World"}
62
+ ~~~
63
+
64
+ ### Using Falcon
65
+
66
+ The default Rails server (Puma) is not suitable for handling a large number of connected WebSocket clients, as it has a limited number of threads (typically between 8 and 16). Each WebSocket connection will require a thread, so the server will quickly run out of threads and be unable to accept new connections. To solve this problem, we can use [Falcon](https://github.com/socketry/falcon) instead, which uses a fiber-per-request architecture and can handle a large number of connections.
67
+
68
+ We need to remove Puma and add Falcon::
69
+
70
+ ~~~ bash
71
+ $ bundle remove puma
72
+ $ bundle add falcon
73
+ ~~~
74
+
75
+ Now when you start the server you should see something like this:
76
+
77
+ ~~~ bash
78
+ $ rails s
79
+ => Booting Falcon v0.47.7
80
+ => Rails 7.2.0.beta2 application starting in development http://localhost:3000
81
+ => Run `bin/rails server --help` for more startup options
82
+ ~~~
83
+
84
+
85
+ ### Using HTTP/2
86
+
87
+ Falcon supports HTTP/2, which can be used to improve the performance of WebSocket connections. HTTP/1.1 requires a separate TCP connection for each WebSocket connection, while HTTP/2 can handle multiple requessts and WebSocket connections over a single TCP connection. To use HTTP/2, you'd typically use `https`, which allows the client browser to use application layer protocol negotiation (ALPN) to negotiate the use of HTTP/2.
88
+
89
+ HTTP/2 WebSockets are a bit different from HTTP/1.1 WebSockets. In HTTP/1, the client sends a `GET` request with the `upgrade:` header. In HTTP/2, the client sends a `CONNECT` request with the `:protocol` pseud-header. The Rails routes must be adjusted to accept both methods:
90
+
91
+ ~~~ ruby
92
+ Rails.application.routes.draw do
93
+ # Previously it was this:
94
+ # get "home/index"
95
+ match "home/index", to: "home#index", via: [:get, :connect]
96
+ end
97
+ ~~~
98
+
99
+ Once this is done, you need to bind falcon to an `https` endpoint:
100
+
101
+ ~~~ bash
102
+ $ falcon serve --bind "https://localhost:3000"
103
+ ~~~
104
+
105
+ It's a bit more tricky to test this, but you can do so with the following Ruby code:
106
+
107
+ ~~~ ruby
108
+ require 'async/http/endpoint'
109
+ require 'async/websocket/client'
110
+
111
+ endpoint = Async::HTTP::Endpoint.parse("https://localhost:3000/home/index")
112
+
113
+ Async::WebSocket::Client.connect(endpoint) do |connection|
114
+ puts connection.framer.connection.class
115
+ # Async::HTTP::Protocol::HTTP2::Client
116
+
117
+ while message = connection.read
118
+ puts message.inspect
119
+ end
120
+ end
121
+ ~~~
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2024, by Samuel Williams.
4
+ # Copyright, 2021-2026, by Samuel Williams.
5
5
  # Copyright, 2021, by Aurora Nockert.
6
6
 
7
7
  require_relative "../connection"
@@ -16,7 +16,7 @@ module Async
16
16
  include ::Protocol::WebSocket::Headers
17
17
 
18
18
  def self.websocket?(request)
19
- Array(request.protocol).any? { |e| e.casecmp?(PROTOCOL) }
19
+ Array(request.protocol).any?{|e| e.casecmp?(PROTOCOL)}
20
20
  end
21
21
 
22
22
  def self.open(request, headers: [], protocols: [], handler: Connection, extensions: ::Protocol::WebSocket::Extensions::Server.default, **options, &block)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2015-2024, by Samuel Williams.
4
+ # Copyright, 2015-2026, by Samuel Williams.
5
5
  # Copyright, 2019, by Bryan Powell.
6
6
  # Copyright, 2019, by Janko Marohnić.
7
7
  # Copyright, 2023, by Thomas Morgan.
@@ -62,7 +62,6 @@ module Async
62
62
 
63
63
  begin
64
64
  yield connection
65
-
66
65
  ensure
67
66
  connection&.close
68
67
  client&.close
@@ -3,9 +3,11 @@
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2018-2024, by Samuel Williams.
5
5
  # Copyright, 2019, by Simon Crocker.
6
+ # Copyright, 2026, by William T. Nelson.
6
7
 
7
8
  require_relative "connection"
8
9
  require_relative "response"
10
+ require_relative "adapters/http"
9
11
 
10
12
  require "protocol/http/middleware"
11
13
 
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2018-2024, by Samuel Williams.
4
+ # Copyright, 2018-2026, by Samuel Williams.
5
5
 
6
6
  module Async
7
7
  module WebSocket
8
- VERSION = "0.30.0"
8
+ VERSION = "0.30.2"
9
9
  end
10
10
  end
data/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2015-2024, by Samuel Williams.
3
+ Copyright, 2015-2026, by Samuel Williams.
4
4
  Copyright, 2019, by Bryan Powell.
5
5
  Copyright, 2019, by Simon Crocker.
6
6
  Copyright, 2019, by Michel Boaventura.
@@ -13,6 +13,7 @@ Copyright, 2023, by Peter Runich.
13
13
  Copyright, 2023, by Thomas Morgan.
14
14
  Copyright, 2023, by Emily Love Mills.
15
15
  Copyright, 2024, by Ryu Sato.
16
+ Copyright, 2026, by William T. Nelson.
16
17
 
17
18
  Permission is hereby granted, free of charge, to any person obtaining a copy
18
19
  of this software and associated documentation files (the "Software"), to deal
data/readme.md CHANGED
@@ -12,6 +12,58 @@ Please see the [project documentation](https://socketry.github.io/async-websocke
12
12
 
13
13
  - [Rails Integration](https://socketry.github.io/async-websocket/guides/rails-integration/index) - This guide explains how to use `async-websocket` with Rails.
14
14
 
15
+ ## Releases
16
+
17
+ Please see the [project releases](https://socketry.github.io/async-websocket/releases/index) for all releases.
18
+
19
+ ### v0.30.2
20
+
21
+ - Adopt reviewed GitHub release pull requests, RubyGems Trusted Publishing, and release attestations instead of legacy certificate signing.
22
+
23
+ ### v0.30.1
24
+
25
+ ### v0.30.0
26
+
27
+ - Improved error handling.
28
+ - Modernized the gem and refreshed dependencies.
29
+
30
+ ### v0.29.1
31
+
32
+ - Improved `connection&.close` handling.
33
+
34
+ ### v0.29.0
35
+
36
+ - Added nonce processing to HTTP/2 WebSockets for HTTP/1 proxy compatibility.
37
+
38
+ ### v0.28.0
39
+
40
+ - Added `ConnectionError` with access to the failed response.
41
+
42
+ ### v0.27.0
43
+
44
+ - Updated the Rails integration guide summary.
45
+ - Modernized the gem and refreshed dependencies.
46
+
47
+ ### v0.26.2
48
+
49
+ - Compared requested WebSocket protocols case-insensitively.
50
+ - Updated the Binance, chat, MUD, and Rack examples.
51
+ - Improved documentation, including the Rails integration guide.
52
+ - Removed obsolete Polygon.io and Utopia examples.
53
+
54
+ ### v0.26.1
55
+
56
+ - Removed the direct dependency on `async-io`.
57
+ - Updated the `sus-fixtures-async-http` dependency.
58
+
59
+ ### v0.26.0
60
+
61
+ - Improved validation of WebSocket requests.
62
+ - Ensured HTTP/2 requests include the `:scheme` pseudo-header.
63
+ - Improved HTTP/1 stream checks.
64
+ - Fixed arguments passed to 404 responses.
65
+ - Updated documentation and links.
66
+
15
67
  ## Contributing
16
68
 
17
69
  We welcome contributions to this project.
@@ -22,6 +74,24 @@ We welcome contributions to this project.
22
74
  4. Push to the branch (`git push origin my-new-feature`).
23
75
  5. Create new Pull Request.
24
76
 
77
+ ### Running Tests
78
+
79
+ To run the test suite:
80
+
81
+ ``` shell
82
+ bundle exec sus
83
+ ```
84
+
85
+ ### Making Releases
86
+
87
+ To prepare a release pull request:
88
+
89
+ ``` shell
90
+ bundle exec bake gem:github:release:patch # or minor or major
91
+ ```
92
+
93
+ See [bake-gem-github](https://github.com/socketry/bake-gem-github) for setup and publishing details.
94
+
25
95
  ### Developer Certificate of Origin
26
96
 
27
97
  In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
data/releases.md ADDED
@@ -0,0 +1,253 @@
1
+ # Releases
2
+
3
+ ## v0.30.2
4
+
5
+ - Adopt reviewed GitHub release pull requests, RubyGems Trusted Publishing, and release attestations instead of legacy certificate signing.
6
+
7
+ ## v0.30.1
8
+
9
+ ## v0.30.0
10
+
11
+ - Improved error handling.
12
+ - Modernized the gem and refreshed dependencies.
13
+
14
+ ## v0.29.1
15
+
16
+ - Improved `connection&.close` handling.
17
+
18
+ ## v0.29.0
19
+
20
+ - Added nonce processing to HTTP/2 WebSockets for HTTP/1 proxy compatibility.
21
+
22
+ ## v0.28.0
23
+
24
+ - Added `ConnectionError` with access to the failed response.
25
+
26
+ ## v0.27.0
27
+
28
+ - Updated the Rails integration guide summary.
29
+ - Modernized the gem and refreshed dependencies.
30
+
31
+ ## v0.26.2
32
+
33
+ - Compared requested WebSocket protocols case-insensitively.
34
+ - Updated the Binance, chat, MUD, and Rack examples.
35
+ - Improved documentation, including the Rails integration guide.
36
+ - Removed obsolete Polygon.io and Utopia examples.
37
+
38
+ ## v0.26.1
39
+
40
+ - Removed the direct dependency on `async-io`.
41
+ - Updated the `sus-fixtures-async-http` dependency.
42
+
43
+ ## v0.26.0
44
+
45
+ - Improved validation of WebSocket requests.
46
+ - Ensured HTTP/2 requests include the `:scheme` pseudo-header.
47
+ - Improved HTTP/1 stream checks.
48
+ - Fixed arguments passed to 404 responses.
49
+ - Updated documentation and links.
50
+
51
+ ## v0.25.1
52
+
53
+ - Updated the minimum `protocol-websocket` version.
54
+
55
+ ## v0.25.0
56
+
57
+ - Allowed arguments to be passed through to `#close`.
58
+ - Improved close behavior.
59
+
60
+ ## v0.24.0
61
+
62
+ - Used standard response handling for Rails.
63
+
64
+ ## v0.23.1
65
+
66
+ - Relaxed the dependency on `protocol-websocket`.
67
+
68
+ ## v0.23.0
69
+
70
+ - Ensured clients are closed when their connections are closed.
71
+ - Fixed the `Server` implementation.
72
+ - Removed an unused `@response` instance variable.
73
+ - Improved coverage for `Client`, `Connection`, `Response`, and dangling connection handling.
74
+ - Added early Rails documentation.
75
+
76
+ ## v0.22.1
77
+
78
+ - Added a missing `protocol/rack/adapter` require.
79
+ - Updated the chat example for the message-based protocol interface.
80
+ - Migrated tests to `sus`.
81
+ - Updated examples for Rack 3 and high-connection-count usage.
82
+
83
+ ## v0.22.0
84
+
85
+ - Removed default JSON parsing.
86
+ - Updated the connection interface to use message-based `read` and `write`.
87
+
88
+ ## v0.21.0
89
+
90
+ - Added support for WebSocket extensions.
91
+
92
+ ## v0.20.0
93
+
94
+ - Made protocol handling Falcon-agnostic.
95
+
96
+ ## v0.19.2
97
+
98
+ - Removed an unused require.
99
+ - Modernized the gem.
100
+
101
+ ## v0.19.1
102
+
103
+ - Made protocol upgrades case-insensitive.
104
+ - Used bound endpoints in server tests to avoid race conditions.
105
+ - Added an example using `wscat`.
106
+ - Adopted `bake-gem` for release management.
107
+
108
+ ## v0.19.0
109
+
110
+ - Added an `http` adapter.
111
+ - Added a Binance HTTP/1 client example.
112
+ - Fixed client handling in `Client#connect`.
113
+ - Updated logging to use `Console.logger`.
114
+
115
+ ## v0.18.0
116
+
117
+ - Added a Rails adapter.
118
+
119
+ ## v0.17.0
120
+
121
+ - Added support for reconnecting after server disconnection.
122
+ - Updated keyword argument handling.
123
+ - Updated Utopia examples and dependencies.
124
+
125
+ ## v0.16.0
126
+
127
+ - Always applied masking to client connections.
128
+ - Passed `endpoint.authority` through to `#connect`.
129
+ - Added a Polygon.io client example.
130
+ - Fixed `GC.count` logging.
131
+
132
+ ## v0.15.0
133
+
134
+ - Improved connection handling and releasing connections back to the pool.
135
+ - Ensured Rack response headers are returned as a hash.
136
+ - Added static documentation.
137
+ - Modernized the gem and improved documentation.
138
+
139
+ ## v0.14.0
140
+
141
+ - Reduced memory usage in high-connection-count examples.
142
+ - Avoided repeated `getaddrinfo` calls per connection.
143
+ - Added explicit connection management.
144
+ - Added documentation for `Client.open` and `Client.connect`.
145
+ - Improved HTTP/1 forcing, Rack, MUD, and Utopia examples.
146
+ - Added profiling support.
147
+ - Switched release tooling toward `bake-bundler`.
148
+
149
+ ## v0.13.1
150
+
151
+ - Fixed HTTP/2 client output body handling.
152
+ - Added HTTP/2 WebSocket support to the chat example.
153
+ - Added message read/write coverage.
154
+
155
+ ## v0.13.0
156
+
157
+ - Passed all options through to `connect`.
158
+
159
+ ## v0.12.2
160
+
161
+ - Updated examples and documentation to use `Adapters::Rack`.
162
+ - Removed debug logging.
163
+ - Refreshed dependencies.
164
+
165
+ ## v0.12.1
166
+
167
+ - Closed and flushed connections automatically when users did not close them explicitly.
168
+
169
+ ## v0.12.0
170
+
171
+ - Added links to relevant RFCs and documented HTTP/2 support.
172
+ - Removed an unused response field.
173
+
174
+ ## v0.11.1
175
+
176
+ - Fixed examples.
177
+
178
+ ## v0.11.0
179
+
180
+ - Started support for both HTTP/1 and HTTP/2 WebSockets.
181
+ - Renamed `URLEndpoint` to `Endpoint`.
182
+ - Preferred `endpoint` terminology over `server_address`.
183
+ - Moved protocol constants into the protocol gem.
184
+ - Fixed client specs.
185
+
186
+ ## v0.10.0
187
+
188
+ - Improved upgrade and masking handling.
189
+ - Allowed user-provided connection handlers.
190
+ - Refactored connection IO to use `Connection#read` and `Connection#write`.
191
+ - Added a simple MUD example.
192
+ - Removed the broken Utopia example.
193
+
194
+ ## v0.9.0
195
+
196
+ - Switched to `protocol-websocket`.
197
+ - Added protocol negotiation and frame validation.
198
+ - Exposed the underlying socket.
199
+ - Improved client/server examples and EOF handling.
200
+ - Removed redundant headers.
201
+
202
+ ## v0.8.0
203
+
204
+ - Added support for `sec-websocket-protocol` options.
205
+ - Added support for passing protocols and normalized client/server option handling.
206
+
207
+ ## v0.7.0
208
+
209
+ - Set headers on WebSocket driver clients.
210
+ - Added more README examples.
211
+ - Preferred `Async do` in examples.
212
+
213
+ ## v0.6.1
214
+
215
+ - Avoided closing connections from `Connection`; client and server lifecycle now close them explicitly.
216
+
217
+ ## v0.6.0
218
+
219
+ - Improved handling of hijacked IO.
220
+
221
+ ## v0.5.0
222
+
223
+ - Added a simple web-based chat app.
224
+ - Added partial support for Rack hijacking changes.
225
+ - Preferred `#readpartial` for input loops.
226
+ - Used the stream block size for reads.
227
+
228
+ ## v0.4.1
229
+
230
+ - Handled `Errno::ECONNRESET`.
231
+
232
+ ## v0.4.0
233
+
234
+ - Updated examples and documentation.
235
+ - Improved peer handling from call results.
236
+
237
+ ## v0.3.0
238
+
239
+ - Added example chat client and server.
240
+ - Reworked legacy code and fixed specs.
241
+
242
+ ## v0.2.0
243
+
244
+ - Renamed the gem to `async-websocket`.
245
+ - Tidied legacy socket lifetime management.
246
+ - Converted connection handling to sequential logic.
247
+ - Improved data stream handling.
248
+ - Handled EOF.
249
+
250
+ ## v0.1.0
251
+
252
+ - Added the initial synchronous WebSocket implementation.
253
+ - Added specs and fixed early implementation issues.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-websocket
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.30.0
4
+ version: 0.30.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -17,39 +17,9 @@ authors:
17
17
  - Michel Boaventura
18
18
  - Peter Runich
19
19
  - Ryu Sato
20
- autorequire:
21
20
  bindir: bin
22
- cert_chain:
23
- - |
24
- -----BEGIN CERTIFICATE-----
25
- MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
26
- ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
27
- CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz
28
- MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd
29
- MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj
30
- bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB
31
- igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2
32
- 9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW
33
- sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE
34
- e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN
35
- XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss
36
- RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn
37
- tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM
38
- zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW
39
- xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
40
- BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs
41
- aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs
42
- aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
43
- cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
44
- xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
45
- c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
46
- 8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
47
- JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
48
- eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
49
- Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
50
- voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
51
- -----END CERTIFICATE-----
52
- date: 2024-09-11 00:00:00.000000000 Z
21
+ cert_chain: []
22
+ date: 1980-01-02 00:00:00.000000000 Z
53
23
  dependencies:
54
24
  - !ruby/object:Gem::Dependency
55
25
  name: async-http
@@ -107,12 +77,13 @@ dependencies:
107
77
  - - "~>"
108
78
  - !ruby/object:Gem::Version
109
79
  version: '0.17'
110
- description:
111
- email:
112
80
  executables: []
113
81
  extensions: []
114
82
  extra_rdoc_files: []
115
83
  files:
84
+ - context/getting-started.md
85
+ - context/index.yaml
86
+ - context/rails-integration.md
116
87
  - lib/async/websocket.rb
117
88
  - lib/async/websocket/adapters/http.rb
118
89
  - lib/async/websocket/adapters/rack.rb
@@ -130,6 +101,7 @@ files:
130
101
  - lib/async/websocket/version.rb
131
102
  - license.md
132
103
  - readme.md
104
+ - releases.md
133
105
  homepage: https://github.com/socketry/async-websocket
134
106
  licenses:
135
107
  - MIT
@@ -137,7 +109,6 @@ metadata:
137
109
  documentation_uri: https://socketry.github.io/async-websocket/
138
110
  funding_uri: https://github.com/sponsors/ioquatix
139
111
  source_code_uri: https://github.com/socketry/async-websocket.git
140
- post_install_message:
141
112
  rdoc_options: []
142
113
  require_paths:
143
114
  - lib
@@ -145,15 +116,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
116
  requirements:
146
117
  - - ">="
147
118
  - !ruby/object:Gem::Version
148
- version: '3.1'
119
+ version: '3.3'
149
120
  required_rubygems_version: !ruby/object:Gem::Requirement
150
121
  requirements:
151
122
  - - ">="
152
123
  - !ruby/object:Gem::Version
153
124
  version: '0'
154
125
  requirements: []
155
- rubygems_version: 3.5.11
156
- signing_key:
126
+ rubygems_version: 4.0.21
157
127
  specification_version: 4
158
128
  summary: An async websocket library on top of protocol-websocket.
159
129
  test_files: []
checksums.yaml.gz.sig DELETED
@@ -1,3 +0,0 @@
1
- g��d_���5��M�Ώk�%mx$ؙ_!�[|�=�yBC0��פ!�}���ֶ`�F+;��Q�M���P����xLa�GL�+}]K��g�6TkDWՊ����,v��~ �f��J{&�}2c/��#�HJOO�R0�A�3��S��u���x
2
- 9�Z�����*
3
- 3��OB�I:qL�n���1s�
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
Binary file