ethon 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -60,7 +60,19 @@ module Ethon
60
60
  # This option is for the multi handle's use only, when using the easy
61
61
  # interface you should instead use the CURLOPT_MAXCONNECTS option.
62
62
  # (Added in 7.16.3)
63
- #
63
+ # @option options :max_total_connections [Integer]
64
+ # Pass a long. The set number will be used as the maximum amount of
65
+ # simultaneously open connections in total. For each new session,
66
+ # libcurl will open a new connection up to the limit set by
67
+ # CURLMOPT_MAX_TOTAL_CONNECTIONS. When the limit is reached, the
68
+ # sessions will be pending until there are available connections.
69
+ # If CURLMOPT_PIPELINING is 1, libcurl will try to pipeline if the host
70
+ # is capable of it.
71
+ # The default value is 0, which means that there is no limit. However,
72
+ # for backwards compatibility, setting it to 0 when CURLMOPT_PIPELINING
73
+ # is 1 will not be treated as unlimited. Instead it will open only 1
74
+ # connection and try to pipeline on it.
75
+ # (Added in 7.30.0)
64
76
  #
65
77
  # @return [ Multi ] The new multi.
66
78
  def initialize(options = {})
@@ -5,6 +5,18 @@ module Ethon
5
5
  # available options on multi.
6
6
  module Options
7
7
 
8
+ # Sets max_total_connections option.
9
+ #
10
+ # @example Set max_total_connections option.
11
+ # easy.max_total_conections = $value
12
+ #
13
+ # @param [ String ] value The value to set.
14
+ #
15
+ # @return [ void ]
16
+ def max_total_connections=(value)
17
+ Curl.set_option(:max_total_connections, value_for(value, :int), handle, :multi)
18
+ end
19
+
8
20
  # Sets maxconnects option.
9
21
  #
10
22
  # @example Set maxconnects option.
@@ -1,5 +1,5 @@
1
1
  module Ethon
2
2
 
3
3
  # Ethon version.
4
- VERSION = '0.6.2'
4
+ VERSION = '0.6.3'
5
5
  end
@@ -5,7 +5,7 @@ describe Ethon::Multi::Options do
5
5
 
6
6
  [
7
7
  :maxconnects, :pipelining, :socketdata, :socketfunction,
8
- :timerdata, :timerfunction
8
+ :timerdata, :timerfunction, :max_total_connections
9
9
  ].each do |name|
10
10
  describe "#{name}=" do
11
11
  it "responds_to" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ethon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
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: 2013-12-19 00:00:00.000000000 Z
12
+ date: 2014-02-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi
@@ -165,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
165
165
  version: '0'
166
166
  segments:
167
167
  - 0
168
- hash: 1717729668424310423
168
+ hash: -3291920420856765924
169
169
  required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  none: false
171
171
  requirements: