protocol-websocket 0.21.0 → 0.21.1

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: 90750bdfa4f0cafe292f5b7faf67cecc3ad8dd599ef30e6be28bf6594405f424
4
- data.tar.gz: 16d01a6e7e451a9444698cc852f937f1f50b9898bdb072d90cf3c93be2ce8b95
3
+ metadata.gz: 9d235a3a271493c223dda297cb508d9be00b2abf75a425cd0dada77f5eec94e2
4
+ data.tar.gz: 348ba1d7a04ebb63a5d521a1605d7503bdb8ab727992e6657106444928231201
5
5
  SHA512:
6
- metadata.gz: 49fdf1a4d58cc4a0b994a763b792cb576a1833d4c50c4abbc7596b8ded83f2df873e13ecf1b5948af392ac42dee3afb6e16210a25ed128b1ca0206e734dc08b4
7
- data.tar.gz: d3ded669f47a3a58a226ee186c58a58e3234c4bf2678cc9fb1633a4a8d58caac9d11715825049a359568af896a376a33c1a42d7b60e02e08d090dc49c2e4ecd9
6
+ metadata.gz: ed8567becfa23f00a414801b263d3aa28db0ce790ab4823160efba567bd4efeab86beb3b77c8729e9df523ae39f8cbe9afb53b5c313afdb45be63640e0e5f339
7
+ data.tar.gz: d61ec56857439b1fd58469c28b28132948036b7d4033cf431786dba5b05931863674e285d5fabd012106e44839fe47bbe2273c2b4fda4b3566a52fadb8204723
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2024, by Samuel Williams.
4
+ # Copyright, 2024-2026, by Samuel Williams.
5
5
 
6
6
  require "json"
7
7
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2024, by Samuel Williams.
4
+ # Copyright, 2024-2026, by Samuel Williams.
5
5
 
6
6
  require_relative "coder/json"
7
7
 
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2024, by Samuel Williams.
5
- # Copyright, 2019, by William T. Nelson.
4
+ # Copyright, 2019-2026, by Samuel Williams.
5
+ # Copyright, 2019-2026, by William T. Nelson.
6
6
  # Copyright, 2021, by Aurora Nockert.
7
7
 
8
8
  require_relative "framer"
@@ -104,6 +104,8 @@ module Protocol
104
104
  else
105
105
  send_close
106
106
  end
107
+ rescue
108
+ @state = :closed
107
109
  end
108
110
 
109
111
  # Close the connection gracefully. This will send a close frame and wait for the remote end to respond with a close frame. Any data received after the close frame is sent will be ignored. If you want to process this data, use {#close_write} instead, and read the data before calling {#close}.
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2024, by Samuel Williams.
4
+ # Copyright, 2019-2026, by Samuel Williams.
5
5
 
6
6
  require "protocol/http/error"
7
7
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2022-2024, by Samuel Williams.
4
+ # Copyright, 2022-2026, by Samuel Williams.
5
5
 
6
6
  require_relative "constants"
7
7
 
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2022-2024, by Samuel Williams.
4
+ # Copyright, 2022-2026, by Samuel Williams.
5
+ # Copyright, 2026, by William T. Nelson.
5
6
 
6
7
  require_relative "extension/compression"
7
8
  require_relative "headers"
@@ -135,10 +136,7 @@ module Protocol
135
136
  # @parameter header [Array(String)] The negotiated extension header tokens.
136
137
  # @returns [Array] The accepted extensions as `[klass, options]` pairs.
137
138
  def accept(headers)
138
- extensions = []
139
-
140
139
  named = self.named
141
- response = []
142
140
 
143
141
  # Each response header should map to at least one extension.
144
142
  Extensions.parse(headers) do |name, arguments|
@@ -5,6 +5,7 @@
5
5
  # Copyright, 2019, by Soumya.
6
6
  # Copyright, 2021, by Aurora Nockert.
7
7
  # Copyright, 2025, by Taleh Zaliyev.
8
+ # Copyright, 2026, by William T. Nelson.
8
9
 
9
10
  require_relative "error"
10
11
 
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2024, by Samuel Williams.
4
+ # Copyright, 2019-2026, by Samuel Williams.
5
+ # Copyright, 2026, by William T. Nelson.
5
6
 
6
7
  require_relative "frame"
7
8
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2024, by Samuel Williams.
4
+ # Copyright, 2019-2026, by Samuel Williams.
5
5
 
6
6
  require "digest/sha1"
7
7
  require "securerandom"
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2022-2024, by Samuel Williams.
4
+ # Copyright, 2022-2026, by Samuel Williams.
5
5
 
6
6
  require_relative "frame"
7
7
  require_relative "coder"
@@ -7,6 +7,6 @@
7
7
  module Protocol
8
8
  # @namespace
9
9
  module WebSocket
10
- VERSION = "0.21.0"
10
+ VERSION = "0.21.1"
11
11
  end
12
12
  end
data/license.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Copyright, 2019-2026, by Samuel Williams.
4
4
  Copyright, 2019, by Soumya.
5
- Copyright, 2019, by William T. Nelson.
5
+ Copyright, 2019-2026, by William T. Nelson.
6
6
  Copyright, 2020, by Olle Jonsson.
7
7
  Copyright, 2021, by Aurora Nockert.
8
8
  Copyright, 2025, by Taleh Zaliyev.
data/readme.md CHANGED
@@ -16,6 +16,10 @@ Please see the [project documentation](https://socketry.github.io/protocol-webso
16
16
 
17
17
  Please see the [project releases](https://socketry.github.io/protocol-websocket/releases/index) for all releases.
18
18
 
19
+ ### v0.21.1
20
+
21
+ - If `Connection#close_write` fails, the connection will now be fully closed to prevent hanging connections.
22
+
19
23
  ### v0.21.0
20
24
 
21
25
  - All frame reading and writing logic has been consolidated into `Framer` to improve performance.
@@ -54,10 +58,6 @@ Please see the [project releases](https://socketry.github.io/protocol-websocket/
54
58
  - Move `#send` logic into `Message` for better encapsulation.
55
59
  - Improve error handling when a `nil` message is passed.
56
60
 
57
- ### v0.15.0
58
-
59
- - Require `Message` class by default.
60
-
61
61
  ## Contributing
62
62
 
63
63
  We welcome contributions to this project.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.21.1
4
+
5
+ - If `Connection#close_write` fails, the connection will now be fully closed to prevent hanging connections.
6
+
3
7
  ## v0.21.0
4
8
 
5
9
  - All frame reading and writing logic has been consolidated into `Framer` to improve performance.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-websocket
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.21.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
+ - William T. Nelson
8
9
  - Aurora Nockert
9
10
  - Soumya
10
11
  - Olle Jonsson
11
12
  - Taleh Zaliyev
12
- - William T. Nelson
13
13
  bindir: bin
14
14
  cert_chain:
15
15
  - |
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  requirements: []
111
- rubygems_version: 4.0.6
111
+ rubygems_version: 4.0.10
112
112
  specification_version: 4
113
113
  summary: A low level implementation of the WebSocket protocol.
114
114
  test_files: []
metadata.gz.sig CHANGED
Binary file