FC++  v0.7.2-1128
FileCatalyst Fast File Transfers - C++ Library
example007.cpp File Reference

Use the callback hook fc::Control::setStatsCallback() to get a statistics callback every second during a transfer. More...

#include "FileCatalyst.hpp"
#include <iostream>
Include dependency graph for example007.cpp:

Functions

void example007_file_transfer_stats_callback (const fc::GlobalStateAndStats &stats, void *ptr)
 
int example007 (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
 

Detailed Description

Use the callback hook fc::Control::setStatsCallback() to get a statistics callback every second during a transfer.

Function Documentation

◆ example007_file_transfer_stats_callback()

void example007_file_transfer_stats_callback ( const fc::GlobalStateAndStats stats,
void *  ptr 
)

References fc::GlobalStateAndStats::fileStatsIdx, fc::GlobalStateAndStats::fileStatsMap, and fc::TransferStats::getStr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ example007()

◆ main()

int main ( int  argc,
char *  argv[] 
)

References example007().

Here is the call graph for this function:

Variable Documentation

◆ username

const std::string username = TEST_USER

◆ password

const std::string password = TEST_PASS

◆ serverIP

const std::string serverIP = TEST_SERVER