cool.io 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 574129faba4be1f5f42244622d7c1ecc94349bd9
4
+ data.tar.gz: cf189c4d87b89133afd04a29c4a5e078244d648b
5
+ SHA512:
6
+ metadata.gz: 037beb60fd9b659e1986885947cc74a77e57004d788dcfd6ac07df4a6196dcd9f784c9a2031759f2bd9b23a667a9f56e4f564b1572b52a9a0549973ecc7df778
7
+ data.tar.gz: a07fd3da19d0c7fddad53c93c8f4942e5562f1562c5a8a0c323c078dc493004db7bb38f131fe9ca0d70c6d1eee7dd873111088eeaa4e41bbe3701fde780f2090
data/CHANGES.md CHANGED
@@ -1,3 +1,8 @@
1
+ 1.1.1
2
+ -----
3
+
4
+ * Add Listener#listen method to change backlog size
5
+
1
6
  1.1.0
2
7
  -----
3
8
 
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in cool.io.gemspec
4
4
  gemspec
@@ -21,6 +21,10 @@ module Coolio
21
21
  @listen_socket.fileno
22
22
  end
23
23
 
24
+ def listen(backlog)
25
+ @listen_socket.listen(backlog)
26
+ end
27
+
24
28
  # Close the listener
25
29
  def close
26
30
  detach if attached?
@@ -53,9 +57,9 @@ module Coolio
53
57
  end
54
58
  end
55
59
 
56
- class TCPListener < Listener
57
- DEFAULT_BACKLOG = 1024
60
+ DEFAULT_BACKLOG = 1024
58
61
 
62
+ class TCPListener < Listener
59
63
  # Create a new Coolio::TCPListener on the specified address and port.
60
64
  # Accepts the following options:
61
65
  #
@@ -87,7 +91,9 @@ module Coolio
87
91
  # Optionally, it can also take anyn existing UNIXServer object
88
92
  # and create a Coolio::UNIXListener out of it.
89
93
  def initialize(*args)
90
- super(::UNIXServer === args.first ? args.first : ::UNIXServer.new(*args))
94
+ s = ::UNIXServer === args.first ? args.first : ::UNIXServer.new(*args)
95
+ s.instance_eval { listen(DEFAULT_BACKLOG) }
96
+ super(s)
91
97
  end
92
98
  end
93
99
  end
@@ -56,7 +56,7 @@ module Coolio
56
56
  raise ArgumentError, "port must be an integer" if nil == port
57
57
  ::TCPServer.new(host, port)
58
58
  end
59
- listen_socket.instance_eval { listen(1024) } # Change listen backlog to 1024
59
+ listen_socket.instance_eval { listen(DEFAULT_BACKLOG) } # Change listen backlog to 1024
60
60
  super(listen_socket, klass, *args, &block)
61
61
  end
62
62
  end
@@ -68,6 +68,7 @@ module Coolio
68
68
  class UNIXServer < Server
69
69
  def initialize(path, klass = UNIXSocket, *args, &block)
70
70
  s = ::UNIXServer === path ? path : ::UNIXServer.new(path)
71
+ s.instance_eval { listen(DEFAULT_BACKLOG) }
71
72
  super(s, klass, *args, &block)
72
73
  end
73
74
  end
@@ -1,5 +1,5 @@
1
1
  module Coolio
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
 
4
4
  def self.version; VERSION; end
5
- end
5
+ end
@@ -11,13 +11,15 @@ describe Cool.io::UNIXServer do
11
11
 
12
12
  it "creates a new Cool.io::UNIXServer" do
13
13
  listener = Cool.io::UNIXListener.new(@tmp.path)
14
+ listener.listen(24)
14
15
  File.socket?(@tmp.path).should == true
15
16
  end
16
17
 
17
18
  it "builds off an existing ::UNIXServer" do
18
19
  unix_server = ::UNIXServer.new(@tmp.path)
19
20
  File.socket?(@tmp.path).should == true
20
- listener = Cool.io::UNIXServer.new(unix_server)
21
+ listener = Cool.io::UNIXServer.new(unix_server, Coolio::UNIXSocket)
22
+ listener.listen(24)
21
23
  File.socket?(@tmp.path).should == true
22
24
  listener.fileno.should == unix_server.fileno
23
25
  end
metadata CHANGED
@@ -1,79 +1,86 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: cool.io
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 1.1.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.1
6
5
  platform: ruby
7
- authors:
6
+ authors:
8
7
  - Tony Arcieri
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
-
13
- date: 2011-08-10 00:00:00 -07:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
11
+ date: 2013-07-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
17
14
  name: iobuffer
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
20
- none: false
21
- requirements:
22
- - - ">="
23
- - !ruby/object:Gem::Version
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
24
19
  version: 1.0.0
25
20
  type: :runtime
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: rake-compiler
29
21
  prerelease: false
30
- requirement: &id002 !ruby/object:Gem::Requirement
31
- none: false
32
- requirements:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake-compiler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
33
31
  - - ~>
34
- - !ruby/object:Gem::Version
32
+ - !ruby/object:Gem::Version
35
33
  version: 0.7.9
36
34
  type: :development
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
39
- name: rspec
40
35
  prerelease: false
41
- requirement: &id003 !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 0.7.9
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
46
47
  version: 2.6.0
47
48
  type: :development
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
50
- name: rdoc
51
49
  prerelease: false
52
- requirement: &id004 !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: 2.6.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: rdoc
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
57
61
  version: 3.6.0
58
62
  type: :development
59
- version_requirements: *id004
60
- description: Cool.io provides a high performance event framework for Ruby which uses the libev C library
61
- email:
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: 3.6.0
69
+ description: Cool.io provides a high performance event framework for Ruby which uses
70
+ the libev C library
71
+ email:
62
72
  - tony.arcieri@gmail.com
63
73
  executables: []
64
-
65
- extensions:
74
+ extensions:
66
75
  - ext/cool.io/extconf.rb
67
76
  - ext/http11_client/extconf.rb
68
77
  extra_rdoc_files: []
69
-
70
- files:
78
+ files:
71
79
  - .gitignore
72
80
  - .rspec
73
81
  - .travis.yml
74
82
  - CHANGES.md
75
83
  - Gemfile
76
- - Gemfile.lock
77
84
  - LICENSE
78
85
  - README.md
79
86
  - Rakefile
@@ -144,35 +151,30 @@ files:
144
151
  - spec/timer_watcher_spec.rb
145
152
  - spec/unix_listener_spec.rb
146
153
  - spec/unix_server_spec.rb
147
- has_rdoc: true
148
154
  homepage: http://coolio.github.com
149
155
  licenses: []
150
-
156
+ metadata: {}
151
157
  post_install_message:
152
158
  rdoc_options: []
153
-
154
- require_paths:
159
+ require_paths:
155
160
  - lib
156
- required_ruby_version: !ruby/object:Gem::Requirement
157
- none: false
158
- requirements:
159
- - - ">="
160
- - !ruby/object:Gem::Version
161
- version: "0"
162
- required_rubygems_version: !ruby/object:Gem::Requirement
163
- none: false
164
- requirements:
165
- - - ">="
166
- - !ruby/object:Gem::Version
167
- version: "0"
161
+ required_ruby_version: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - '>='
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ required_rubygems_version: !ruby/object:Gem::Requirement
167
+ requirements:
168
+ - - '>='
169
+ - !ruby/object:Gem::Version
170
+ version: '0'
168
171
  requirements: []
169
-
170
172
  rubyforge_project:
171
- rubygems_version: 1.6.2
173
+ rubygems_version: 2.0.2
172
174
  signing_key:
173
- specification_version: 3
175
+ specification_version: 4
174
176
  summary: A cool framework for doing high performance I/O in Ruby
175
- test_files:
177
+ test_files:
176
178
  - spec/async_watcher_spec.rb
177
179
  - spec/dns_spec.rb
178
180
  - spec/spec_helper.rb
@@ -1,32 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- cool.io (1.1.0)
5
- iobuffer (>= 1.0.0)
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- diff-lcs (1.1.2)
11
- iobuffer (1.0.0)
12
- rake (0.9.2)
13
- rake-compiler (0.7.9)
14
- rake
15
- rdoc (3.6.1)
16
- rspec (2.6.0)
17
- rspec-core (~> 2.6.0)
18
- rspec-expectations (~> 2.6.0)
19
- rspec-mocks (~> 2.6.0)
20
- rspec-core (2.6.4)
21
- rspec-expectations (2.6.0)
22
- diff-lcs (~> 1.1.2)
23
- rspec-mocks (2.6.0)
24
-
25
- PLATFORMS
26
- ruby
27
-
28
- DEPENDENCIES
29
- cool.io!
30
- rake-compiler (~> 0.7.9)
31
- rdoc (>= 3.6.0)
32
- rspec (>= 2.6.0)