#include <pers_file_xfer.h>

Public Member Functions | |
| PERS_FILE_XFER () | |
| ~PERS_FILE_XFER () | |
| int | init (FILE_INFO *, bool is_file_upload) |
| bool | poll () |
| void | transient_failure (int) |
| void | permanent_failure (int) |
| void | abort () |
| int | write (MIOFILE &fout) |
| int | parse (MIOFILE &fin) |
| int | create_xfer () |
| int | start_xfer () |
| void | suspend () |
Public Attributes | |
| bool | is_upload |
| double | next_request_time |
| time to next retry the file request | |
| double | time_so_far |
| double | last_time |
| double | last_bytes_xferred |
| bool | pers_xfer_done |
| FILE_XFER * | fxp |
| nonzero if file xfer in progress | |
| FILE_INFO * | fip |
The FILE_INFO has a list of URLs. For download, the object attempts to download the file from any combination of the URLs. For upload, try to upload the file in its entirety to one of the URLs. a PERS_FILE_XFER is created and added to pers_file_xfer_set 1) when read from the client state file in (FILE_INFO::parse(), CLIENT_STATE::parse_state_file() 2) when a FILE_INFO is ready to transfer in CLIENT_STATE::handle_pers_file_xfers() a PERS_FILE_XFER p is removed from pers_file_xfer_set and freed 1) when p->pers_xfer_done is true in CLIENT_STATE::handle_pers_file_xfers() A FILE_XFER is created and added to file_xfer_set and linked from PFX 1) in PERS_FILE_XFER::start_xfer() A FILE_XFER is erased from file_xfer_set, unlinked from PFX and freed 1) when the FILE_XFER is done, in PERS_FILE_XFER::poll() PERS_FILE_XFER::check_giveup() 2) user request, in PERS_FILE_XFER::abort() PERS_FILE_XFER::suspend() 3) if the FILE_XFER_SET::insert() fails PERS_FILE_XFER::start_xfer() NOTE: when this is done, pers_xfer_done is set
pointers: PERS_FILE_XFER -> FILE_XFER set in PERS_FILE_XFER::start_xfer() zeroed (see above) PERS_FILE_XFER -> FILE_INFO set in PERS_FILE_XFER::init() FILE_INFO -> PERS_FILE_XFER set in FILE_INFO::parse(), CLIENT_STATE::handle_pers_file_xfers() zeroed in PERS_FILE_XFER destructor
| PERS_FILE_XFER::PERS_FILE_XFER | ( | ) |
| PERS_FILE_XFER::~PERS_FILE_XFER | ( | ) |
| int PERS_FILE_XFER::init | ( | FILE_INFO * | f, | |
| bool | is_file_upload | |||
| ) |


| bool PERS_FILE_XFER::poll | ( | ) |

| void PERS_FILE_XFER::transient_failure | ( | int | retval | ) |


| void PERS_FILE_XFER::permanent_failure | ( | int | retval | ) |


| void PERS_FILE_XFER::abort | ( | ) |

| int PERS_FILE_XFER::write | ( | MIOFILE & | fout | ) |


| int PERS_FILE_XFER::parse | ( | MIOFILE & | fin | ) |


| int PERS_FILE_XFER::create_xfer | ( | ) |


| int PERS_FILE_XFER::start_xfer | ( | ) |


| void PERS_FILE_XFER::suspend | ( | ) |

time to next retry the file request
| double PERS_FILE_XFER::time_so_far |
Total time there's been an active FILE_XFER for this PFX Currently not used for anything; not meaningful for throughput because could include repeated transfer
| double PERS_FILE_XFER::last_time |
when the above was last updated. Defined only while a transfer is active
Save how much is transferred when transfer isn't active, used to display progress in GUI.
nonzero if file xfer in progress
1.5.6