1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/* Copyright (c) 2001 Matej Pfajfar.
* Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2021, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* @file download_status_st.h
* @brief Directory download status/schedule structure.
**/
/** Information about our plans for retrying downloads for a downloadable
* directory object.
* Each type of downloadable directory object has a corresponding retry
* <b>schedule</b>, which can be different depending on whether the object is
* being downloaded from an authority or a mirror (<b>want_authority</b>).
* <b>next_attempt_at</b> contains the next time we will attempt to download
* the object.
* For schedules that <b>increment_on</b> failure, <b>n_download_failures</b>
* is used to determine the position in the schedule. (Each schedule is a
* smartlist of integer delays, parsed from a CSV option.) Every time a
* connection attempt fails, <b>n_download_failures</b> is incremented,
* the new delay value is looked up from the schedule, and
* <b>next_attempt_at</b> is set delay seconds from the time the previous
* connection failed. Therefore, at most one failure-based connection can be
* in progress for each download_status_t.
* For schedules that <b>increment_on</b> attempt, <b>n_download_attempts</b>
* is used to determine the position in the schedule. Every time a
* connection attempt is made, <b>n_download_attempts</b> is incremented,
* the new delay value is looked up from the schedule, and
* <b>next_attempt_at</b> is set delay seconds from the time the previous
* connection was attempted. Therefore, multiple concurrent attempted-based
* connections can be in progress for each download_status_t.
* After an object is successfully downloaded, any other concurrent connections
* are terminated. A new schedule which starts at position 0 is used for
* subsequent downloads of the same object.
*/
;
/* !defined(DOWNLOAD_STATUS_ST_H) */