cool.io 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/CHANGES.md +6 -0
- data/appveyor.yml +18 -0
- data/cool.io.gemspec +1 -1
- data/ext/cool.io/extconf.rb +5 -0
- data/lib/cool.io/listener.rb +25 -13
- data/lib/cool.io/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: befae475513e70b03f1860baa2564540ee9bbdef
|
4
|
+
data.tar.gz: 1f492b338548bdd661a008d1621213b7d59ffe86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cdb6490f8a0f81e6f07fe00b4aa7a3e0152f71e8727e6779b8445c970e44c68314011c34101a19ea3ffbae4d2ca5d1e7f3eca3962e10ac780428d7e27ab0a42
|
7
|
+
data.tar.gz: 985f43951a363925d5da9c7472ec59564d07b317697cefc0a3aae6d4110e686005107616fd6ea723a9a480da749ff844d309545c0aca3073e18d926394272dd0
|
data/.travis.yml
CHANGED
data/CHANGES.md
CHANGED
data/appveyor.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
install:
|
3
|
+
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
|
4
|
+
- ruby --version
|
5
|
+
- gem --version
|
6
|
+
- bundle install
|
7
|
+
build: off
|
8
|
+
test_script:
|
9
|
+
- bundle exec rake -rdevkit
|
10
|
+
|
11
|
+
environment:
|
12
|
+
matrix:
|
13
|
+
- ruby_version: "200"
|
14
|
+
- ruby_version: "200-x64"
|
15
|
+
- ruby_version: "21"
|
16
|
+
- ruby_version: "21-x64"
|
17
|
+
- ruby_version: "22"
|
18
|
+
- ruby_version: "22-x64"
|
data/cool.io.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.require_paths = ["lib"]
|
24
24
|
|
25
25
|
s.add_development_dependency "rake-compiler", "~> 0.9.5"
|
26
|
-
s.add_development_dependency "rake-compiler-dock", "~> 0.
|
26
|
+
s.add_development_dependency "rake-compiler-dock", "~> 0.5.0"
|
27
27
|
s.add_development_dependency "rspec", ">= 2.13.0"
|
28
28
|
s.add_development_dependency "rdoc", ">= 3.6.0"
|
29
29
|
end
|
data/ext/cool.io/extconf.rb
CHANGED
data/lib/cool.io/listener.rb
CHANGED
@@ -40,19 +40,31 @@ module Coolio
|
|
40
40
|
#########
|
41
41
|
|
42
42
|
# Coolio callback for handling new connections
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
43
|
+
unless RUBY_PLATFORM =~ /mingw|mswin/
|
44
|
+
def on_readable
|
45
|
+
begin
|
46
|
+
on_connection @listen_socket.accept_nonblock
|
47
|
+
rescue Errno::EAGAIN, Errno::ECONNABORTED
|
48
|
+
# EAGAIN can be triggered here if the socket is shared between
|
49
|
+
# multiple processes and a thundering herd is woken up to accept
|
50
|
+
# one connection, only one process will get the connection and
|
51
|
+
# the others will be awoken.
|
52
|
+
# ECONNABORTED is documented in accept() manpages but modern TCP
|
53
|
+
# stacks with syncookies and/or accept()-filtering for DoS
|
54
|
+
# protection do not see it. In any case this error is harmless
|
55
|
+
# and we should instead spend our time with clients that follow
|
56
|
+
# through on connection attempts.
|
57
|
+
end
|
58
|
+
end
|
59
|
+
else
|
60
|
+
def on_readable
|
61
|
+
begin
|
62
|
+
# In Windows, accept_nonblock() with multiple processes
|
63
|
+
# causes thundering herd problem.
|
64
|
+
# To avoid this, we need to use accept().
|
65
|
+
on_connection @listen_socket.accept
|
66
|
+
rescue Errno::EAGAIN, Errno::ECONNABORTED
|
67
|
+
end
|
56
68
|
end
|
57
69
|
end
|
58
70
|
end
|
data/lib/cool.io/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cool.io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Arcieri
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-01-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake-compiler
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.
|
34
|
+
version: 0.5.0
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.
|
41
|
+
version: 0.5.0
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rspec
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,6 +86,7 @@ files:
|
|
86
86
|
- LICENSE
|
87
87
|
- README.md
|
88
88
|
- Rakefile
|
89
|
+
- appveyor.yml
|
89
90
|
- cool.io.gemspec
|
90
91
|
- examples/callbacked_echo_server.rb
|
91
92
|
- examples/dslified_echo_client.rb
|