FC++  v0.7.1-1067
FileCatalyst Fast File Transfers - C++ Library
FC++ API

The following table contains a partial set of the FC++ API.

Not all classes and methods are listed here. For the complete list, please refer to the fc namespace.

FC++ API (core)

Mapping of fccl command-line parameters to C++ API calls:

Example CLI Parameter Corresponding FC++ API Additional Information
-aggression 2 fc::Options::setCongestionControl() --congestioncontrol
-args <filename> see Using fccl --args  
-autoresume fc::Options::setTransferResume()  
-bandwidth 25000 fc::Options::setBandwidth() --bandwidth and --startrate
-block 4194304 fc::Options::setLimits() --blocksize and --unitsize
-congestioncontrol fc::Options::setCongestionControl() --congestioncontrol
-connecttimeoutsec 30 fc::Options::setTimeout()  
-donotoverwrite fc::Options::setOverwrite()  
-download fc::Control::download()  
-file <filename> fc::Control::prepareSingleFile()  
-file <path> fc::Control::prepareRecursiveDir()  
-handshake 2 fc::Options::setSslHandshake()  
-host ftp.example.com fc::Options::setFtpServer()  
-host ftp.example.com:21 fc::Options::setFtpServer()  
-keepalive 55 fc::Options::setSocketOptions()  
-localdir /tmp fc::Options::setLocaldir()  
-mode ftp fc::Options::setMode()  
-mode tcp fc::Options::setMode()  
-mode udp fc::Options::setMode()  
-multithread 5 fc::Options::setMultiThreaded() --multithread and --numencoders
-noaes fc::Options::setEncryption()  
-numencoders fc::Options::setEncoders() --multithread and --numencoders
-overwrite fc::Options::setOverwrite()  
-passwd secret fc::Options::setUsernameAndPassword()  
-port 21 fc::Options::setFtpServer() --ssl and --port
-remotedir /incoming fc::Options::setRemotedir()  
-retry 3 fc::Options::setRetries()  
-showstats fc::Control::getMostRecentFileStats() --showstats
-socketbuffersize 8192 fc::Options::setSocketOptions()  
-ssl fc::Options::setEncryption() --ssl and --port
-startrate 5000 fc::Options::setBandwidth() --bandwidth and --startrate
-tempfilename fc::Options::setTmpFilenames()  
-timeout 30 fc::Options::setTimeout()  
-unitsize 1024 fc::Options::setLimits() --blocksize and --unitsize
-upload fc::Control::upload()  
-user bob –passwd secret fc::Options::setUsernameAndPassword()  
-user bob/secret fc::Options::setUsernameAndPassword()  
-verify fc::Options::setMd5Verification() --verify
-verifymode 0 fc::Options::setMd5Verification()  
-version fc::libfcVersionStr()
fc::libfcBitSize()
 
-waitretry 15 fc::Options::setRetries()  

FC++ API (additional)

Several other useful or relevant C++ API calls with no directly corresponding parameters in fccl:

FC++ API  
fc::Control::changeDirectory()  
fc::Control::cancelTransfer()  
fc::Control::clearFileMap()  
fc::Control::clearGlobalStats()  
fc::Control::deleteFile()  
fc::Control::detectApproximateDownloadSpeed()  
fc::Control::detectApproximateUploadSpeed()  
fc::Control::getCurrentServerReplyCode()  
fc::Control::getCurrentServerReplyString()  
fc::Control::getDirectoryDetails()  
fc::Control::getDirectoryListing()  
fc::Control::getFileMap()  
fc::Control::getFileMD5()  
fc::Control::getFileModificationTime()  
fc::Control::getFileSize()  
fc::Control::getGlobalStateAndStats()  
fc::Control::getMostRecentFileStats()  
fc::Control::getOptimalUnitAndBlockSizes()  
fc::Control::getOptions()  
fc::Control::isConnected()  
fc::Control::isDirectory()  
fc::Control::isFile()  
fc::Control::isLoggedIn()  
fc::Control::makeDirectory()  
fc::Control::nameExists()  
fc::Control::prepareRecursiveDir()  
fc::Control::prepareSingleFile()  
fc::Control::removeDirectory()  
fc::Control::renameFile()  
fc::Control::setNewOptions()  
fc::Control::setStatsCallback()  
fc::Options::getMap()  
fc::Options::getStr()  
fc::Options::reset()  
fc::Options::setClientId()  

FC++ API (formatting)

Several functions are available for convenience to format some numerical FC++ statistic values (such as times, file sizes, bandwidth transfer rates) to easy-to-read text strings:

FC++ API Example
fc::formatBytesIEC() "12.45 MiB"
fc::formatBytesSI() "13.05 MB"
fc::formatBytesOldStyle() "12.45 MB"
fc::formatTimeDuration() "45s"
fc::formatTimeDuration2() "0:45"
fc::formatTimeRecent() "in 45 seconds"
fc::formatTimestamp() "2014-09-17 08:53:16"
fc::formatTimestamp2() "2014-09-17 08:53:16.073211"
fc::formatTransferRate() "125.80 Kbps"
fc::formatTransferStatsEState()(mostly for debug use)