Use a 2nd thread combined with fc::Control::getMostRecentFileStats() to display a simple progress indicator while the original thread completes a download using fc::Control::prepareSingleFile() and fc::Control::download(). More...
Functions | |
void | example004_progress_thread (void) |
int | example004 (void) |
int | main (int argc, char *argv[]) |
Variables | |
const std::string | username = TEST_USER |
const std::string | password = TEST_PASS |
const std::string | serverIP = TEST_SERVER |
const fc::TransferStats * | stats = NULL |
bool | showProgress = true |
Use a 2nd thread combined with fc::Control::getMostRecentFileStats() to display a simple progress indicator while the original thread completes a download using fc::Control::prepareSingleFile() and fc::Control::download().
void example004_progress_thread | ( | void | ) |
References fc::formatTimeDuration(), fc::TransferStats::payloadBytesExpected, fc::TransferStats::payloadBytesTransferred, showProgress, and fc::TransferStats::timeRemaining.
int example004 | ( | void | ) |
References fc::TransferStats::bitsPerSecondAverageTransferRate, fc::Control::connect(), fc::Exception::display(), fc::Control::download(), example004_progress_thread(), fc::formatBytesIEC(), fc::formatTimeDuration(), fc::formatTransferRate(), fc::Control::getMostRecentFileStats(), fc::kEthernet, fc::kUdp, fc::TransferStats::localFilename, fc::TransferStats::localMd5, password, fc::TransferStats::payloadBytesTransferred, fc::Control::prepareSingleFile(), fc::TransferStats::remoteFilename, serverIP, fc::Options::setFtpServer(), showProgress, fc::Name::str(), fc::TransferStats::timeTransferBegan, fc::TransferStats::timeTransferFinished, and username.
int main | ( | int | argc, |
char * | argv[] | ||
) |
const std::string username = TEST_USER |
const std::string password = TEST_PASS |
const std::string serverIP = TEST_SERVER |
const fc::TransferStats* stats = NULL |
bool showProgress = true |