protocol-websocket 0.12.0 → 0.12.1
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 +0 -0
- data/lib/protocol/websocket/extension/compression/deflate.rb +12 -4
- data/lib/protocol/websocket/extension/compression/inflate.rb +2 -3
- data/lib/protocol/websocket/frame.rb +4 -0
- data/lib/protocol/websocket/version.rb +1 -1
- data/readme.md +8 -0
- data.tar.gz.sig +0 -0
- metadata +3 -59
- 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: 48ab5e17dd31fff02afee7770e13982923252d35c0e78f0f8b12f35d6d34ff2a
|
4
|
+
data.tar.gz: 5cfe56a5875410c6190f65928ea4b0897abccb66981581b46271e9bd8b2d72a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f558e9e5b5f4a1d83cc1cfa298b5a4edef48a0fc256b4ba949ce8d10db66a9c7df9db1b68cf083e46b340984f7c1575b745b8f0a81c45a66a63405ff703d11e
|
7
|
+
data.tar.gz: 9e3f2863933129185d723c256ac2d1ad1086e357ae4028f05dc2b1d746b9e8e29d5e57ee98148e2f045997eb1acfbfe1c7e1ff325d2815a3ad75b145fe2590c1
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -54,21 +54,29 @@ module Protocol
|
|
54
54
|
attr :context_takeover
|
55
55
|
|
56
56
|
def pack_text_frame(buffer, compress: true, **options)
|
57
|
-
|
57
|
+
if compress
|
58
|
+
buffer = self.deflate(buffer)
|
59
|
+
end
|
58
60
|
|
59
61
|
frame = @parent.pack_text_frame(buffer, **options)
|
60
62
|
|
61
|
-
|
63
|
+
if compress
|
64
|
+
frame.flags |= Frame::RSV1
|
65
|
+
end
|
62
66
|
|
63
67
|
return frame
|
64
68
|
end
|
65
69
|
|
66
70
|
def pack_binary_frame(buffer, compress: false, **options)
|
67
|
-
|
71
|
+
if compress
|
72
|
+
buffer = self.deflate(buffer)
|
73
|
+
end
|
68
74
|
|
69
75
|
frame = @parent.pack_binary_frame(buffer, **options)
|
70
76
|
|
71
|
-
|
77
|
+
if compress
|
78
|
+
frame.flags |= Frame::RSV1
|
79
|
+
end
|
72
80
|
|
73
81
|
return frame
|
74
82
|
end
|
@@ -54,12 +54,11 @@ module Protocol
|
|
54
54
|
|
55
55
|
frame = frames.first
|
56
56
|
|
57
|
-
if frame.
|
57
|
+
if frame.flag?(Frame::RSV1)
|
58
58
|
buffer = self.inflate(buffer)
|
59
|
+
frame.flags &= ~Frame::RSV1
|
59
60
|
end
|
60
61
|
|
61
|
-
frame.flags &= ~Frame::RSV1
|
62
|
-
|
63
62
|
return buffer
|
64
63
|
end
|
65
64
|
|
data/readme.md
CHANGED
@@ -17,3 +17,11 @@ We welcome contributions to this project.
|
|
17
17
|
3. Commit your changes (`git commit -am 'Add some feature'`).
|
18
18
|
4. Push to the branch (`git push origin my-new-feature`).
|
19
19
|
5. Create new Pull Request.
|
20
|
+
|
21
|
+
### Developer Certificate of Origin
|
22
|
+
|
23
|
+
This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted.
|
24
|
+
|
25
|
+
### Contributor Covenant
|
26
|
+
|
27
|
+
This project is governed by [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protocol-websocket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -41,7 +41,7 @@ cert_chain:
|
|
41
41
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
42
42
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
43
43
|
-----END CERTIFICATE-----
|
44
|
-
date: 2023-
|
44
|
+
date: 2023-10-05 00:00:00.000000000 Z
|
45
45
|
dependencies:
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: protocol-http
|
@@ -57,62 +57,6 @@ dependencies:
|
|
57
57
|
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: '0.2'
|
60
|
-
- !ruby/object:Gem::Dependency
|
61
|
-
name: protocol-http1
|
62
|
-
requirement: !ruby/object:Gem::Requirement
|
63
|
-
requirements:
|
64
|
-
- - "~>"
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: '0.2'
|
67
|
-
type: :runtime
|
68
|
-
prerelease: false
|
69
|
-
version_requirements: !ruby/object:Gem::Requirement
|
70
|
-
requirements:
|
71
|
-
- - "~>"
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: '0.2'
|
74
|
-
- !ruby/object:Gem::Dependency
|
75
|
-
name: bundler
|
76
|
-
requirement: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - ">="
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: '0'
|
81
|
-
type: :development
|
82
|
-
prerelease: false
|
83
|
-
version_requirements: !ruby/object:Gem::Requirement
|
84
|
-
requirements:
|
85
|
-
- - ">="
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '0'
|
88
|
-
- !ruby/object:Gem::Dependency
|
89
|
-
name: covered
|
90
|
-
requirement: !ruby/object:Gem::Requirement
|
91
|
-
requirements:
|
92
|
-
- - ">="
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: '0'
|
95
|
-
type: :development
|
96
|
-
prerelease: false
|
97
|
-
version_requirements: !ruby/object:Gem::Requirement
|
98
|
-
requirements:
|
99
|
-
- - ">="
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '0'
|
102
|
-
- !ruby/object:Gem::Dependency
|
103
|
-
name: sus
|
104
|
-
requirement: !ruby/object:Gem::Requirement
|
105
|
-
requirements:
|
106
|
-
- - "~>"
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: '0.16'
|
109
|
-
type: :development
|
110
|
-
prerelease: false
|
111
|
-
version_requirements: !ruby/object:Gem::Requirement
|
112
|
-
requirements:
|
113
|
-
- - "~>"
|
114
|
-
- !ruby/object:Gem::Version
|
115
|
-
version: '0.16'
|
116
60
|
description:
|
117
61
|
email:
|
118
62
|
executables: []
|
@@ -161,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
105
|
- !ruby/object:Gem::Version
|
162
106
|
version: '0'
|
163
107
|
requirements: []
|
164
|
-
rubygems_version: 3.
|
108
|
+
rubygems_version: 3.4.19
|
165
109
|
signing_key:
|
166
110
|
specification_version: 4
|
167
111
|
summary: A low level implementation of the WebSocket protocol.
|
metadata.gz.sig
CHANGED
Binary file
|