diff options
| author | ulim <a.sporto+bee@gmail.com> | 2008-05-06 02:20:11 +0200 | 
|---|---|---|
| committer | ulim <a.sporto+bee@gmail.com> | 2008-05-06 02:20:11 +0200 | 
| commit | d56ee38d444fb9a4bc0fbf7f699eaf675e019591 (patch) | |
| tree | e01b72d9906e40d627c1dceb8d7956463cef8607 /dcc.h | |
| parent | 29c1456dcadec0d239ffc9d88ea06695b66c435c (diff) | |
timeout of transfers after 120 seconds of no progress (bytes received/sent).
Diffstat (limited to 'dcc.h')
| -rw-r--r-- | dcc.h | 8 | 
1 files changed, 8 insertions, 0 deletions
| @@ -46,6 +46,10 @@  /* Send an ACK after receiving this amount of data */  #define DCC_PACKET_SIZE 1024 +/* Time in seconds that a DCC transfer can be stalled before being aborted. + * By handling this here individual protocols don't have to think about this. */ +#define DCC_MAX_STALL 120 +  typedef struct dcc_file_transfer {  	struct im_connection *ic; @@ -63,6 +67,10 @@ typedef struct dcc_file_transfer {  	gint watch_in;   /* readable */  	gint watch_out;  /* writable */ +	/* the progress watcher cancels any file transfer if nothing happens within DCC_MAX_STALL */ +	gint progress_timeout; +	size_t progress_bytes_last; +  	/*  	 * The total amount of bytes that have been sent to the irc client.  	 */ | 
