async-websocket 0.29.1 → 0.30.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +3 -4
- data/lib/async/websocket/adapters/http.rb +4 -4
- data/lib/async/websocket/adapters/rack.rb +4 -4
- data/lib/async/websocket/adapters/rails.rb +2 -2
- data/lib/async/websocket/client.rb +7 -7
- data/lib/async/websocket/connect_request.rb +7 -7
- data/lib/async/websocket/connect_response.rb +3 -3
- data/lib/async/websocket/connection.rb +8 -4
- data/lib/async/websocket/error.rb +2 -2
- data/lib/async/websocket/request.rb +4 -4
- data/lib/async/websocket/response.rb +4 -4
- data/lib/async/websocket/server.rb +3 -3
- data/lib/async/websocket/upgrade_request.rb +7 -9
- data/lib/async/websocket/upgrade_response.rb +4 -4
- data/lib/async/websocket/version.rb +1 -1
- data/lib/async/websocket.rb +4 -4
- data.tar.gz.sig +0 -0
- metadata +12 -12
- 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: 65d7e723e07e05a813e668c1e4a3dfb82213b1b76955d2e1c8d7f8bcd338de8a
|
4
|
+
data.tar.gz: cbfe2bc3be018398c2c5787052cf5e381a10c3d8695a324be386cb7aef20f0df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9973e91dc44e1a8e072acd3f9c7c8fb999d62f3c0fc9a4e0e4e45558453e3f780838ed30e7a7216094afe059a5eb9831b06e0a36b92ec5ff5126f94eec8b46c5
|
7
|
+
data.tar.gz: bde87b0d45786863bf68c4c6d463fbc102ab2e3a0fa12c7fff9f346f5594858065d72ae6ee3b2bcfeb9289c1432681fb62f2350abc65d52257b62658ab3186bc
|
checksums.yaml.gz.sig
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
��
|
2
|
-
|
3
|
-
|
4
|
-
!`'t�%i��irje����ƦM��y�1��&��w�l
|
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�
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2021-
|
4
|
+
# Copyright, 2021-2024, by Samuel Williams.
|
5
5
|
# Copyright, 2021, by Aurora Nockert.
|
6
6
|
|
7
|
-
require_relative
|
8
|
-
require_relative
|
7
|
+
require_relative "../connection"
|
8
|
+
require_relative "../response"
|
9
9
|
|
10
|
-
require
|
10
|
+
require "protocol/websocket/extensions"
|
11
11
|
|
12
12
|
module Async
|
13
13
|
module WebSocket
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2019-
|
4
|
+
# Copyright, 2019-2024, by Samuel Williams.
|
5
5
|
|
6
|
-
require_relative
|
7
|
-
require
|
8
|
-
require
|
6
|
+
require_relative "http"
|
7
|
+
require "protocol/rack/request"
|
8
|
+
require "protocol/rack/adapter"
|
9
9
|
|
10
10
|
module Async
|
11
11
|
module WebSocket
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2021-
|
4
|
+
# Copyright, 2021-2024, by Samuel Williams.
|
5
5
|
# Copyright, 2023, by Emily Love Mills.
|
6
6
|
|
7
|
-
require_relative
|
7
|
+
require_relative "rack"
|
8
8
|
|
9
9
|
module Async
|
10
10
|
module WebSocket
|
@@ -6,16 +6,16 @@
|
|
6
6
|
# Copyright, 2019, by Janko Marohnić.
|
7
7
|
# Copyright, 2023, by Thomas Morgan.
|
8
8
|
|
9
|
-
require_relative
|
10
|
-
require_relative
|
9
|
+
require_relative "request"
|
10
|
+
require_relative "connection"
|
11
11
|
|
12
|
-
require
|
13
|
-
require
|
14
|
-
require
|
12
|
+
require "protocol/websocket/headers"
|
13
|
+
require "protocol/websocket/extensions"
|
14
|
+
require "protocol/http/middleware"
|
15
15
|
|
16
|
-
require
|
16
|
+
require "async/http/client"
|
17
17
|
|
18
|
-
require
|
18
|
+
require "delegate"
|
19
19
|
|
20
20
|
module Async
|
21
21
|
module WebSocket
|
@@ -1,15 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2019-
|
4
|
+
# Copyright, 2019-2024, by Samuel Williams.
|
5
5
|
# Copyright, 2023, by Thomas Morgan.
|
6
6
|
|
7
|
-
require
|
8
|
-
require
|
9
|
-
require
|
10
|
-
require
|
7
|
+
require "protocol/http/request"
|
8
|
+
require "protocol/http/headers"
|
9
|
+
require "protocol/websocket/headers"
|
10
|
+
require "protocol/http/body/readable"
|
11
11
|
|
12
|
-
require
|
12
|
+
require "async/variable"
|
13
13
|
|
14
14
|
module Async
|
15
15
|
module WebSocket
|
@@ -75,7 +75,7 @@ module Async
|
|
75
75
|
headers.add(SEC_WEBSOCKET_VERSION, String(version))
|
76
76
|
|
77
77
|
if protocols.any?
|
78
|
-
headers.add(SEC_WEBSOCKET_PROTOCOL, protocols.join(
|
78
|
+
headers.add(SEC_WEBSOCKET_PROTOCOL, protocols.join(","))
|
79
79
|
end
|
80
80
|
|
81
81
|
super(request.scheme, request.authority, ::Protocol::HTTP::Methods::CONNECT, request.path, nil, headers, body, PROTOCOL)
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2019-
|
4
|
+
# Copyright, 2019-2024, by Samuel Williams.
|
5
5
|
|
6
|
-
require
|
7
|
-
require
|
6
|
+
require "protocol/http/response"
|
7
|
+
require "async/http/body/hijack"
|
8
8
|
|
9
9
|
module Async
|
10
10
|
module WebSocket
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2018-
|
4
|
+
# Copyright, 2018-2024, by Samuel Williams.
|
5
5
|
# Copyright, 2019, by Janko Marohnić.
|
6
6
|
|
7
|
-
require
|
8
|
-
require
|
7
|
+
require "protocol/websocket/connection"
|
8
|
+
require "protocol/websocket/headers"
|
9
9
|
|
10
|
-
require
|
10
|
+
require "json"
|
11
11
|
|
12
12
|
module Async
|
13
13
|
module WebSocket
|
@@ -42,6 +42,10 @@ module Async
|
|
42
42
|
end
|
43
43
|
|
44
44
|
attr :protocol
|
45
|
+
|
46
|
+
def inspect
|
47
|
+
"#<#{self.class} state=#{@state}>"
|
48
|
+
end
|
45
49
|
end
|
46
50
|
end
|
47
51
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2019-
|
4
|
+
# Copyright, 2019-2024, by Samuel Williams.
|
5
5
|
|
6
|
-
require
|
6
|
+
require "protocol/websocket/error"
|
7
7
|
|
8
8
|
module Async
|
9
9
|
module WebSocket
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2019-
|
4
|
+
# Copyright, 2019-2024, by Samuel Williams.
|
5
5
|
|
6
|
-
require_relative
|
7
|
-
require_relative
|
8
|
-
require_relative
|
6
|
+
require_relative "connect_request"
|
7
|
+
require_relative "upgrade_request"
|
8
|
+
require_relative "error"
|
9
9
|
|
10
10
|
module Async
|
11
11
|
module WebSocket
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2019-
|
4
|
+
# Copyright, 2019-2024, by Samuel Williams.
|
5
5
|
|
6
|
-
require_relative
|
7
|
-
require_relative
|
6
|
+
require_relative "upgrade_response"
|
7
|
+
require_relative "connect_response"
|
8
8
|
|
9
|
-
require_relative
|
9
|
+
require_relative "error"
|
10
10
|
|
11
11
|
module Async
|
12
12
|
module WebSocket
|
@@ -4,10 +4,10 @@
|
|
4
4
|
# Copyright, 2018-2024, by Samuel Williams.
|
5
5
|
# Copyright, 2019, by Simon Crocker.
|
6
6
|
|
7
|
-
require_relative
|
8
|
-
require_relative
|
7
|
+
require_relative "connection"
|
8
|
+
require_relative "response"
|
9
9
|
|
10
|
-
require
|
10
|
+
require "protocol/http/middleware"
|
11
11
|
|
12
12
|
module Async
|
13
13
|
module WebSocket
|
@@ -5,15 +5,13 @@
|
|
5
5
|
# Copyright, 2023, by Thomas Morgan.
|
6
6
|
# Copyright, 2024, by Ryu Sato.
|
7
7
|
|
8
|
-
require
|
9
|
-
require
|
8
|
+
require "protocol/http/middleware"
|
9
|
+
require "protocol/http/request"
|
10
10
|
|
11
|
-
require
|
12
|
-
require
|
11
|
+
require "protocol/http/headers"
|
12
|
+
require "protocol/websocket/headers"
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
require_relative 'error'
|
14
|
+
require_relative "error"
|
17
15
|
|
18
16
|
module Async
|
19
17
|
module WebSocket
|
@@ -65,7 +63,7 @@ module Async
|
|
65
63
|
headers.add(SEC_WEBSOCKET_VERSION, String(version))
|
66
64
|
|
67
65
|
if protocols.any?
|
68
|
-
headers.add(SEC_WEBSOCKET_PROTOCOL, protocols.join(
|
66
|
+
headers.add(SEC_WEBSOCKET_PROTOCOL, protocols.join(","))
|
69
67
|
end
|
70
68
|
|
71
69
|
super(request.scheme, request.authority, ::Protocol::HTTP::Methods::GET, request.path, nil, headers, nil, PROTOCOL)
|
@@ -82,7 +80,7 @@ module Async
|
|
82
80
|
end
|
83
81
|
end
|
84
82
|
|
85
|
-
verified = accept_digest && Array(response.protocol).map(&:downcase) == %w(websocket) && response.headers[
|
83
|
+
verified = accept_digest && Array(response.protocol).map(&:downcase) == %w(websocket) && response.headers["connection"]&.include?("upgrade")
|
86
84
|
|
87
85
|
return Wrapper.new(response, verified: verified)
|
88
86
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2019-
|
4
|
+
# Copyright, 2019-2024, by Samuel Williams.
|
5
5
|
# Copyright, 2023, by Thomas Morgan.
|
6
6
|
|
7
|
-
require
|
8
|
-
require
|
9
|
-
require
|
7
|
+
require "async/http/body/hijack"
|
8
|
+
require "protocol/http/response"
|
9
|
+
require "protocol/websocket/headers"
|
10
10
|
|
11
11
|
module Async
|
12
12
|
module WebSocket
|
data/lib/async/websocket.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2015-
|
4
|
+
# Copyright, 2015-2024, by Samuel Williams.
|
5
5
|
|
6
|
-
require_relative
|
7
|
-
require_relative
|
8
|
-
require_relative
|
6
|
+
require_relative "websocket/version"
|
7
|
+
require_relative "websocket/server"
|
8
|
+
require_relative "websocket/client"
|
data.tar.gz.sig
CHANGED
Binary file
|
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.
|
4
|
+
version: 0.30.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -49,7 +49,7 @@ cert_chain:
|
|
49
49
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
50
50
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
51
51
|
-----END CERTIFICATE-----
|
52
|
-
date: 2024-09-
|
52
|
+
date: 2024-09-11 00:00:00.000000000 Z
|
53
53
|
dependencies:
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: async-http
|
@@ -57,56 +57,56 @@ dependencies:
|
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0.
|
60
|
+
version: '0.76'
|
61
61
|
type: :runtime
|
62
62
|
prerelease: false
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0.
|
67
|
+
version: '0.76'
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
69
|
name: protocol-http
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - "
|
72
|
+
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 0.
|
74
|
+
version: '0.34'
|
75
75
|
type: :runtime
|
76
76
|
prerelease: false
|
77
77
|
version_requirements: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- - "
|
79
|
+
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: 0.
|
81
|
+
version: '0.34'
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: protocol-rack
|
84
84
|
requirement: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '0.
|
88
|
+
version: '0.7'
|
89
89
|
type: :runtime
|
90
90
|
prerelease: false
|
91
91
|
version_requirements: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: '0.
|
95
|
+
version: '0.7'
|
96
96
|
- !ruby/object:Gem::Dependency
|
97
97
|
name: protocol-websocket
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '0.
|
102
|
+
version: '0.17'
|
103
103
|
type: :runtime
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '0.
|
109
|
+
version: '0.17'
|
110
110
|
description:
|
111
111
|
email:
|
112
112
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|