websocket 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/CHANGELOG.md +4 -0
- data/README.md +2 -2
- data/lib/websocket/frame/base.rb +2 -0
- data/lib/websocket/frame/handler/handler05.rb +8 -0
- data/lib/websocket/version.rb +1 -1
- metadata +2 -2
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
- Travis CI build: [![](https://travis-ci.org/imanel/websocket-ruby.png)](http://travis-ci.org/imanel/websocket-ruby)
|
4
4
|
- Autobahn tests: [server](http://imanel.github.com/websocket-ruby/autobahn/server/), client
|
5
5
|
|
6
|
-
Universal Ruby library to handle WebSocket protocol. It
|
6
|
+
Universal Ruby library to handle WebSocket protocol. It focuses on providing abstraction layer over [WebSocket API](http://dev.w3.org/html5/websockets/) instead of providing server or client functionality.
|
7
7
|
|
8
8
|
Currently WebSocket Ruby supports all existing drafts of WebSocket, which include:
|
9
9
|
|
@@ -106,7 +106,7 @@ For examples on how to use WebSocket Ruby see examples directory in the reposito
|
|
106
106
|
|
107
107
|
## Native extension
|
108
108
|
|
109
|
-
WebSocket gem is written in pure Ruby, without any dependencies or native extensions and still is one of the fastest implementations of WebSocket API. However, if you want to increase it's speed even further, I created additional gem with dedicated native extensions for both C and Java. Those extensions provide 20-30%
|
109
|
+
WebSocket gem is written in pure Ruby, without any dependencies or native extensions and still is one of the fastest implementations of WebSocket API. However, if you want to increase it's speed even further, I created additional gem with dedicated native extensions for both C and Java. Those extensions provide 20-30% increase in speed(more accurate comparison can be found in autobahn test results)
|
110
110
|
|
111
111
|
In order to use native extension just install [websocket-native](http://github.com/imanel/websocket-ruby-native) gem or add it to Gemfile - WebSocket will automatically detect and load it.
|
112
112
|
|
data/lib/websocket/frame/base.rb
CHANGED
@@ -9,9 +9,11 @@ module WebSocket
|
|
9
9
|
# @param args [Hash] Arguments for frame
|
10
10
|
# @option args [String] :data default data for frame
|
11
11
|
# @option args [String] :type Type of frame - available types are "text", "binary", "ping", "pong" and "close"(support depends on draft version)
|
12
|
+
# @option args [Integer] :code Code for close frame. Supported by drafts > 05.
|
12
13
|
# @option args [Integer] :version Version of draft. Currently supported version are 75, 76 and 00-13.
|
13
14
|
def initialize(args = {})
|
14
15
|
@type = args[:type]
|
16
|
+
@code = args[:code]
|
15
17
|
@data = Data.new(args[:data].to_s)
|
16
18
|
@version = args[:version] || DEFAULT_VERSION
|
17
19
|
include_version
|
data/lib/websocket/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: websocket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|