Functions | |
void | example004_progress_thread () |
int | example004 () |
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 | ( | ) |
References fc::formatTimeDuration(), fc::TransferStats::payloadBytesExpected, fc::TransferStats::payloadBytesTransferred, showProgress, stats, and fc::TransferStats::timeRemaining.
int example004 | ( | ) |
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, fc::TransferStats::remoteMd5, serverIP, fc::Options::setFtpServer(), showProgress, stats, 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 |