diff options
author | 2010-06-22 02:26:28 +0300 | |
---|---|---|
committer | 2010-06-22 02:26:28 +0300 | |
commit | d262715b84de2b5346880a963d3baec061f1aaf1 (patch) | |
tree | d32a4a308b484e41537789d604156a50ae152fd2 /segget/settings.cpp | |
parent | Add option [settings].max_segment_size (diff) | |
download | idfetch-d262715b84de2b5346880a963d3baec061f1aaf1.tar.gz idfetch-d262715b84de2b5346880a963d3baec061f1aaf1.tar.bz2 idfetch-d262715b84de2b5346880a963d3baec061f1aaf1.zip |
Add options [connections].connection_timeout, [connections].ftp_response_timeout, [connections].timeout.
Set the number of seconds to wait while trying to connect. Use 0 to wait
indefinitely. Pass a long. It should contain the maximum time in seconds that
you allow the connection to the server to take. This only limits the connection
phase, once it has connected, this option is of no more use. Set to zero to
disable connection timeout (it will then only timeout on the system's internal
timeouts). See also the TIMEOUT option.
default:
connection_timeout=15
Set a timeout period (in seconds) on the amount of time that the server is
allowed to take in order to generate a response message for a command before the
session is considered hung. While awaiting for a response, this value overrides
TIMEOUT. It is recommended that if used in conjunction with TIMEOUT, you set
FTP_RESPONSE_TIMEOUT to a value smaller than TIMEOUT.
default:
ftp_response_timeout=5000
maximum amount of time to download segment in seconds
Set the maximum number of seconds for a connection to execute.
Pass a long as parameter containing the maximum time in seconds that you allow
the transfer operation to take. Normally, name lookups can take a considerable
time and limiting operations to less than a few minutes risk aborting perfectly
normal operations.
default:
timeout=6000
Diffstat (limited to 'segget/settings.cpp')
-rw-r--r-- | segget/settings.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/segget/settings.cpp b/segget/settings.cpp index 317f99b..ee58e2a 100644 --- a/segget/settings.cpp +++ b/segget/settings.cpp @@ -13,6 +13,9 @@ class Tsettings{ public: string distfiles_dir; string segments_dir; + uint connection_timeout; + uint ftp_response_timeout; + uint time_out; uint max_connections; uint max_connection_num_per_distfile; uint max_segment_size; @@ -21,6 +24,8 @@ class Tsettings{ resume_on(1), distfiles_dir("./distfiles"), segments_dir("./tmp"), + connection_timeout(15), + ftp_response_timeout(5000),time_out(6000), max_connections(6), max_connection_num_per_distfile(3), max_segment_size(500000), @@ -36,7 +41,11 @@ void Tsettings::load_from_conf_file(){ conf.set(distfiles_dir, "folders", "distfiles_dir"); conf.set(segments_dir, "folders", "segments_dir"); // log("segments_dir set to:"+segments_dir); + conf.set(max_connections, "connections", "max_connections"); + conf.set(connection_timeout, "connections", "connection_timeout"); + conf.set(ftp_response_timeout, "connections", "ftp_response_timeout"); + conf.set(time_out, "connections", "timeout"); conf.set(max_connection_num_per_distfile, "distfiles", "max_connection_num_per_distfile"); conf.set(resume_on, "segments", "resume_on"); conf.set(max_segment_size, "segments", "max_segment_size"); |