1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-22 22:20:39 +00:00

(trunk libT) experimental commit for faster tracker announces

This commit is contained in:
Charles Kerr 2010-02-03 03:38:13 +00:00
parent 9489762d26
commit 5014319622
2 changed files with 4 additions and 6 deletions

View file

@ -57,10 +57,10 @@ enum
KEYLEN = 8, KEYLEN = 8,
/* how many scrapes we allow at one time */ /* how many scrapes we allow at one time */
MAX_CONCURRENT_SCRAPES = 96, MAX_CONCURRENT_SCRAPES = 48,
/* how many announces we allow at one time */ /* how many announces we allow at one time */
MAX_CONCURRENT_ANNOUNCES = 96, MAX_CONCURRENT_ANNOUNCES = 48,
/* if a tracker takes more than this long to respond, /* if a tracker takes more than this long to respond,
* we treat it as nonresponsive */ * we treat it as nonresponsive */

View file

@ -29,7 +29,7 @@ enum
{ {
TR_MEMORY_TRASH = 0xCC, TR_MEMORY_TRASH = 0xCC,
DEFAULT_TIMER_MSEC = 1500, /* arbitrary */ DEFAULT_TIMER_MSEC = 250, /* arbitrary */
MIN_DNS_CACHE_TIME = 60 * 60 * 24 MIN_DNS_CACHE_TIME = 60 * 60 * 24
}; };
@ -378,7 +378,6 @@ addTask( void * vtask )
evtimer_set( &task->timer_event, task_timeout_cb, task ); evtimer_set( &task->timer_event, task_timeout_cb, task );
tr_timerAdd( &task->timer_event, timeout, 0 ); tr_timerAdd( &task->timer_event, timeout, 0 );
curl_easy_setopt( e, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
curl_easy_setopt( e, CURLOPT_SOCKOPTFUNCTION, sockoptfunction ); curl_easy_setopt( e, CURLOPT_SOCKOPTFUNCTION, sockoptfunction );
curl_easy_setopt( e, CURLOPT_SOCKOPTDATA, task ); curl_easy_setopt( e, CURLOPT_SOCKOPTDATA, task );
curl_easy_setopt( e, CURLOPT_WRITEDATA, task ); curl_easy_setopt( e, CURLOPT_WRITEDATA, task );
@ -386,8 +385,7 @@ addTask( void * vtask )
curl_easy_setopt( e, CURLOPT_DNS_CACHE_TIMEOUT, MIN_DNS_CACHE_TIME ); curl_easy_setopt( e, CURLOPT_DNS_CACHE_TIMEOUT, MIN_DNS_CACHE_TIME );
curl_easy_setopt( e, CURLOPT_FOLLOWLOCATION, 1L ); curl_easy_setopt( e, CURLOPT_FOLLOWLOCATION, 1L );
curl_easy_setopt( e, CURLOPT_AUTOREFERER, 1L ); curl_easy_setopt( e, CURLOPT_AUTOREFERER, 1L );
curl_easy_setopt( e, CURLOPT_FORBID_REUSE, 1L ); curl_easy_setopt( e, CURLOPT_MAXREDIRS, 4L );
curl_easy_setopt( e, CURLOPT_MAXREDIRS, -1L );
curl_easy_setopt( e, CURLOPT_NOSIGNAL, 1L ); curl_easy_setopt( e, CURLOPT_NOSIGNAL, 1L );
curl_easy_setopt( e, CURLOPT_PRIVATE, task ); curl_easy_setopt( e, CURLOPT_PRIVATE, task );
curl_easy_setopt( e, CURLOPT_SSL_VERIFYHOST, 0L ); curl_easy_setopt( e, CURLOPT_SSL_VERIFYHOST, 0L );