Transferring multiple files using the FTP client z/TPF APIs
When you are transferring multiple files to or from a remote server, it
is more efficient to do so by using the same FTP client session;
however, FTP client sessions
cannot be shared across processes. Use the following APIs to transfer multiple
files in your application:
- Call the tpf_ftpConnect function to connect to a remote FTP server.
- Optionally call the tpf_ftpGetOpts or tpf_ftpSetOpts function to get or set the file transfer options for an FTP connection.
- Call the tpf_ftpGet or tpf_ftpPut function to transfer files from or to a remote FTP server.
- Repeat the previous steps to transfer multiple files.
- When you have finished using the FTP session, call the tpf_ftpDisconnect function
to end the session. Note: The z/TPF system will not automatically end idle sessions that are started by z/TPF applications.