celluloid-websocket 0.0.7 → 0.0.8

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
  SHA1:
3
- metadata.gz: c2824474fb842c2a69ca0409cf69875f1e05dc2b
4
- data.tar.gz: f18ed0bf37317d353dba4df1e2552910dbd89322
3
+ metadata.gz: 38412eb46cf2d31b4a97c740a83c35032e4acd20
4
+ data.tar.gz: 3b0f5f14039647e635f45e09db4db7da82c84d88
5
5
  SHA512:
6
- metadata.gz: d79460a17d946e053d83562a8e12d962c65c414602902ac492b383bdc9f0d734e161bc71904cda66cc0ea9fc4594a1097eefb70f1b91710367745c653a7dfca7
7
- data.tar.gz: 012edc9ad8b4c8ff1bf4365c6ae3254dba015daef66a20894192dbb4175b359ade77a832548847c8ac04bf80c562c33af63c5d5aa5b1ad9e1339267cc28271b1
6
+ metadata.gz: 8729bcac7a29d74446d02aff47b6263a7c607a940e36acdcc8f33976e984b76d2a167ba9b1ad15a780b715db53c75a8070039ca488825eb6a8e9f9c41512eae7
7
+ data.tar.gz: 712fb6f81684df547d35697d75276c9dcfb85c8899e5945305ef062e20cb83c8e9f34101eb0ce14623c18e71f7ee6687bbc28a7269d576514dbdc929ff361b1f
@@ -18,6 +18,11 @@ module Celluloid
18
18
  @socket
19
19
  end
20
20
 
21
+ def readpartial(bufsize)
22
+ result = super(bufsize)
23
+ result
24
+ end
25
+
21
26
  # Receives a message
22
27
  def recv(maxlen, flags=nil)
23
28
  raise NotImplementedError, "flags not supported" if flags && !flags.zero?
@@ -6,7 +6,7 @@ require 'rack/request'
6
6
  module Celluloid
7
7
  class WebSocket
8
8
  extend Forwardable
9
- include Celluloid
9
+ include Celluloid::IO
10
10
 
11
11
  finalizer :shutdown
12
12
 
@@ -13,10 +13,6 @@ module Celluloid
13
13
  end
14
14
 
15
15
  lambda do |env|
16
- # We need to create the pool in the first request
17
- # because we might've been forked before.
18
- @pool ||= pool(config)
19
-
20
16
  if env['HTTP_UPGRADE'].nil? || env['HTTP_UPGRADE'].downcase != 'websocket'
21
17
  return [400, {}, "No Upgrade header or Upgrade not for websocket."]
22
18
  end
@@ -24,7 +20,7 @@ module Celluloid
24
20
  env['rack.hijack'].call
25
21
  socket = Celluloid::IO::RackSocket.new(env['rack.hijack_io'].to_io)
26
22
 
27
- @pool.async.initialize_websocket(env, socket)
23
+ new(*config[:args]).async.initialize_websocket(env, socket)
28
24
  [200,{},""]
29
25
  end
30
26
  end
@@ -1,5 +1,5 @@
1
1
  module Celluloid
2
2
  class WebSocket
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: celluloid-websocket
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tinco Andringa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-23 00:00:00.000000000 Z
11
+ date: 2015-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler