protocol-websocket 0.20.0 → 0.20.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0f42ab3d5253103ee0a3bc0b3b6ad1ba09c34cd05aa0ae8abcad14cf41889f5
4
- data.tar.gz: e543425bcc0219da7de6d8bf25c55cb27e2065ab3848090a0464558d929c1e79
3
+ metadata.gz: ff918f001efdfca622476924df547f137959c0b42c9eb489a6d3252d4e2f111f
4
+ data.tar.gz: 81a99be831aee6267cf3c2291b945b08a2c4055604ed3a1bab61ddf9b2963c6a
5
5
  SHA512:
6
- metadata.gz: c4f5c67e456e61dceab5407edc739e6c14c165f9d9e123459c64d307c4573f8db2d8ac441d13e009bdbfba34a2d5342db314a03d97635816be6a1031b156f401
7
- data.tar.gz: 268a562e395ae6bfbe2460881af7fe81a549ee43f1a95e2039250a8d50d15b217a2d1a251ca56e59e5b33866f1ecfc16b3b8efb861f4d15a449e07f8df1ddfe9
6
+ metadata.gz: 6a71e45dc30989dcb02c8c3520e827865c7131a7eda8e8c08f0e86b6331c5730017725a4db1abc7f38643342ceeb1aeb906052b98e937ba36dad5c4abc27f8df
7
+ data.tar.gz: 45309a8c2f2d7d98f49379e7899d01261d90bc7b08a84683b6c3c646570239213a6294149b06a228fd0c2c2b15ffa682b1ac26a45fedd65460b8b1c3ac137a27
checksums.yaml.gz.sig CHANGED
Binary file
@@ -28,7 +28,7 @@ module Protocol
28
28
  # @attribute [Framer] The framer which is used for reading and writing frames.
29
29
  attr :framer
30
30
 
31
- # @attribte [String | Nil] The optional mask which is used when generating frames.
31
+ # @attribute [String | Boolean | Nil] The optional mask which is used when generating frames.
32
32
  attr :mask
33
33
 
34
34
  # @attribute [Integer] The allowed reserved bits.
@@ -23,7 +23,6 @@ module Protocol
23
23
  # @parameter mask [Boolean | String] An optional 4-byte string which is used to mask the payload.
24
24
  def initialize(finished = true, payload = nil, flags: 0, opcode: self.class::OPCODE, mask: false)
25
25
  if mask == true
26
- # Generate a unique mask for each frame:
27
26
  mask = SecureRandom.bytes(4)
28
27
  end
29
28
 
@@ -29,11 +29,9 @@ module Protocol
29
29
 
30
30
  # Wraps an underlying {Async::IO::Stream} for reading and writing binary data into structured frames.
31
31
  class Framer
32
- def initialize(stream, frames = FRAMES, requires_masking: false)
32
+ def initialize(stream, frames = FRAMES)
33
33
  @stream = stream
34
34
  @frames = frames
35
-
36
- @requires_masking = requires_masking
37
35
  end
38
36
 
39
37
  # Close the underlying stream.
@@ -56,10 +54,6 @@ module Protocol
56
54
  klass = @frames[opcode] || Frame
57
55
  frame = klass.read(finished, flags, opcode, @stream, maximum_frame_size)
58
56
 
59
- if @requires_masking and !frame.mask
60
- raise ProtocolError, "Received unmasked frame but requires masking!"
61
- end
62
-
63
57
  return frame
64
58
  end
65
59
 
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Protocol
7
7
  module WebSocket
8
- VERSION = "0.20.0"
8
+ VERSION = "0.20.1"
9
9
  end
10
10
  end
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.20.0
4
+ version: 0.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file