Aspera C++ Fasp Manager API
Version 3.2.70439-x
The FASP Manager library provides a high-level interface for creating new
Aspera transfer jobs and monitoring transfer status and progress statistics through polling and/or callback mechanisms. This documentation specifies the FASP Manager library API and a sample program, FaspManagerSample.cpp, demonstrating how the API may be used in a C++ application for the following basic transfer cases:
- pushing (uploading) a single file or directory to a remote destination
- pulling (downloading) a single file or directory from a remote source
- transferring a list of files or directories.
Please consult Aspera if you have specific requirements, not covered in the sample code.
The FaspManagerSample is an MSVC solution that builds a sample executable linking the FASP Manager library. The Sample provides an interactive shell demonstrating transfer control commands and displaying the transfer progress statistics and status events. Typing "help" at the prompt displays a complete listing of supported commands, including displaying per file and whole job statistics, and commands to pause, resume, cancel, and change the rate of an ongoing transfer.
As illustrated by the FaspManagerSample, to use the FASP Manager API to start an
Aspera transfer, please use the following steps:
- Create a new FASP Manager object. The constructor creates and starts a singleton Manager. In turn, the Manager creates a FASP Manager server socket and starts up a handler thread to listen for fasp management protocol messages from the underlying scp.aspera process
- Create a JobOrder, a description of the transfer session to be done, including:
- A Local or Remote endpoint Location specifying the login user, host ip, and pathnames to transfer;
- The transfer parameters such as target rate, bandwidth sharing policy, a minimum rate for adaptive rate control, the TCP and UDP ports used, and the encryption settings.
- Optionally create a CallbackFunctor (a Callback Function) that will be registered for receiving asynchronous callback messages reporting the transfer progress statistics and transfer status events.
- Call the Manager's LaunchJob method, passing in the JobOrder definition and Callback Functor reference.
During the transfer, the application may optionally call the Manager's ControlJob method to send commands to pause, resume or change the transfer speed or bandwidth sharing policy.