websocket-driver 0.6.4-java → 0.6.5-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE.md +22 -0
- data/README.md +0 -24
- data/lib/websocket/driver.rb +9 -1
- data/lib/websocket/mask.rb +14 -0
- data/lib/websocket_mask.jar +0 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcd1cd3f4fbfa7dcdcd3ec1a5190165abc4072bb
|
4
|
+
data.tar.gz: 71104f9f20b82cbd2677ed13cdeb9c71790a26aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bfe24e050a4f5b342328af911fbdfe260c0e22ec933f2b56bae8657dc50a08ce77c6c3622be18432dc0da44a9eb2be67df494402c9736029864a10f0725ea6f
|
7
|
+
data.tar.gz: bb1f533ae8da678e7d81142fdc65a4d38e4835782b859183919ed97568636e58c2f1feb289b0e40ce67e7469a0990bd42297fb19680dbcebd9ee07ae38b045d3
|
data/CHANGELOG.md
CHANGED
data/LICENSE.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# License
|
2
|
+
|
3
|
+
(The MIT License)
|
4
|
+
|
5
|
+
Copyright (c) 2010-2017 James Coglan
|
6
|
+
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
8
|
+
this software and associated documentation files (the 'Software'), to deal in
|
9
|
+
the Software without restriction, including without limitation the rights to
|
10
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
11
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
12
|
+
subject to the following conditions:
|
13
|
+
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
15
|
+
copies or substantial portions of the Software.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
19
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
20
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
21
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
22
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -367,27 +367,3 @@ Returns the WebSocket version in use as a string. Will either be `hixie-75`,
|
|
367
367
|
Returns a string containing the selected subprotocol, if any was agreed upon
|
368
368
|
using the `Sec-WebSocket-Protocol` mechanism. This value becomes available after
|
369
369
|
`emit('open')` has fired.
|
370
|
-
|
371
|
-
|
372
|
-
## License
|
373
|
-
|
374
|
-
(The MIT License)
|
375
|
-
|
376
|
-
Copyright (c) 2010-2016 James Coglan
|
377
|
-
|
378
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
379
|
-
this software and associated documentation files (the 'Software'), to deal in
|
380
|
-
the Software without restriction, including without limitation the rights to
|
381
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
382
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
383
|
-
subject to the following conditions:
|
384
|
-
|
385
|
-
The above copyright notice and this permission notice shall be included in all
|
386
|
-
copies or substantial portions of the Software.
|
387
|
-
|
388
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
389
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
390
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
391
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
392
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
393
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/websocket/driver.rb
CHANGED
@@ -19,7 +19,15 @@ module WebSocket
|
|
19
19
|
class Driver
|
20
20
|
|
21
21
|
root = File.expand_path('../driver', __FILE__)
|
22
|
-
|
22
|
+
|
23
|
+
begin
|
24
|
+
# Load C native extension
|
25
|
+
require 'websocket_mask'
|
26
|
+
rescue LoadError
|
27
|
+
# Fall back to pure-Ruby implementation
|
28
|
+
require 'websocket/mask'
|
29
|
+
end
|
30
|
+
|
23
31
|
|
24
32
|
if RUBY_PLATFORM =~ /java/
|
25
33
|
require 'jruby'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module WebSocket
|
2
|
+
module Mask
|
3
|
+
def self.mask(payload, mask)
|
4
|
+
return payload if mask.nil? || payload.empty?
|
5
|
+
|
6
|
+
payload.tap do |result|
|
7
|
+
payload.bytesize.times do |i|
|
8
|
+
result.setbyte(i, payload.getbyte(i) ^ mask.getbyte(i % 4))
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
data/lib/websocket_mask.jar
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: websocket-driver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- James Coglan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: websocket-extensions
|
@@ -88,6 +88,7 @@ extra_rdoc_files:
|
|
88
88
|
- README.md
|
89
89
|
files:
|
90
90
|
- CHANGELOG.md
|
91
|
+
- LICENSE.md
|
91
92
|
- README.md
|
92
93
|
- examples/tcp_server.rb
|
93
94
|
- ext/websocket-driver/WebsocketMaskService.java
|
@@ -109,6 +110,7 @@ files:
|
|
109
110
|
- lib/websocket/http/headers.rb
|
110
111
|
- lib/websocket/http/request.rb
|
111
112
|
- lib/websocket/http/response.rb
|
113
|
+
- lib/websocket/mask.rb
|
112
114
|
- lib/websocket/websocket_mask.rb
|
113
115
|
- lib/websocket_mask.jar
|
114
116
|
homepage: http://github.com/faye/websocket-driver-ruby
|