ethon 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ethon/multi.rb +13 -1
- data/lib/ethon/multi/options.rb +12 -0
- data/lib/ethon/version.rb +1 -1
- data/spec/ethon/multi/options_spec.rb +1 -1
- metadata +3 -3
data/lib/ethon/multi.rb
CHANGED
@@ -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 = {})
|
data/lib/ethon/multi/options.rb
CHANGED
@@ -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.
|
data/lib/ethon/version.rb
CHANGED
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.
|
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:
|
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:
|
168
|
+
hash: -3291920420856765924
|
169
169
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
170
170
|
none: false
|
171
171
|
requirements:
|