summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostyantyn Ovechko <fastinetserver@gmail.com>2010-06-22 02:26:28 +0300
committerKostyantyn Ovechko <fastinetserver@gmail.com>2010-06-22 02:26:28 +0300
commitd262715b84de2b5346880a963d3baec061f1aaf1 (patch)
treed32a4a308b484e41537789d604156a50ae152fd2 /segget/connection.cpp
parentAdd option [settings].max_segment_size (diff)
downloadidfetch-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/connection.cpp')
-rw-r--r--segget/connection.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/segget/connection.cpp b/segget/connection.cpp
index 9cb5a1e..b6a2394 100644
--- a/segget/connection.cpp
+++ b/segget/connection.cpp
@@ -4,14 +4,14 @@
#include <time.h>
class Tconnection{
- private:
- ulong bytes_per_last_interval;
- public:
- void *segment;
- Tconnection():bytes_per_last_interval(0),segment(0){};
- void inc_bytes_per_last_interval(ulong new_bytes_count){bytes_per_last_interval+=new_bytes_count;};
- ulong get_bytes_per_last_interval(){return bytes_per_last_interval;};
- void reset_bytes_per_last_interval(){bytes_per_last_interval=0;};
+ private:
+ ulong bytes_per_last_interval;
+ public:
+ void *segment;
+ Tconnection():bytes_per_last_interval(0),segment(0){};
+ void inc_bytes_per_last_interval(ulong new_bytes_count){bytes_per_last_interval+=new_bytes_count;};
+ ulong get_bytes_per_last_interval(){return bytes_per_last_interval;};
+ void reset_bytes_per_last_interval(){bytes_per_last_interval=0;};
};
#define MAX_CONNECTS 6 /* number of simultaneous transfers */