HS FTP is a software library written in C which implements the client side of the File Transfer Protocol over TCP socket layer according to RFC 959.
HS FTP is offered with full source code in C language and can be used from C/C++ programs
The library allows a user application to connect to remote FTP servers, traverse server directory structure, send, receive, delete and rename files, create, remove and rename folders. The HS FTP protocol module supports passive mode data connections, user / password authentication and many FTP commands sequences: USER, PASS, TYPE, PASV, LIST, CWD, MKD, RMD, RETR, STOR, DELE, PWD, RNFR, RNTO.
HS FTP also supports recursive download, upload and delete of folder with all files and sub-folders. There are functions for configuration and statistics.
The use of HS FTP C Source Library is Royalty Free.
- FTP Client RFC 959 operation
- Server name resolution
- Concurrent FTP client sessions (maximum 32)
- Passive mode, firewall friendly
- User / password authentication
- Asynchronous Operation
- Supported FTP Commands: USER, PASS, PASV, LIST, TYPE, RETR, STOR, CWD, MKD, RMD, DELE, PWD, RNFR, RNTO
- Recursive Folder Download
- Recursive Folder Upload
- Recursive Folder Delete
- Configurable Timeout
- Thread safe
How It Works
To connect to remote FTP server, the user application calls HsFtpCliConnect function, supplying connection parameters, such as remote FTP server name or IP address, username and password for authentication etc. It also supplies a pointer to callback function that the HS FTP module uses to communicate with the user code.
When the control FTP connection is established and HS FTP has successfully passed user / password FTP account authentication phase, the user application is asynchronously notified via event HS_FTPCLI_USR_EV_LOGGEDIN
At this point, the user application can request remote FTP server directory listing using HsFtpCliList function, request to change current directory at remote FTP server with HsFtpCliChDr function or transfer binary files to and from remote FTP server with HsFtpCliSendFile and HsFtpCliGetFile functions.
The result of each operation is asynchronously notified via corresponding events.
HS FTP Library Architecture
Fragment of HS FTP interface header file>
Sending files: The files are sent by HS FTP module in binary image mode (TYPE I) using passive mode data connections. Whenever HS FTP and underlying socket layer interface module HS SOCK are ready to transmit next block of file data, the user application is requested for next data block to send via event callback with HS_FTPCLI_USR_EV_TXSEG event.
Receiving Files: The files are received by HS FTP module in binary image mode (TYPE I) in passive data connection mode. Whenever the next block of data from the remote FTP server becomes available, the data is passed to the user application via event callback with HS_FTPCLI_USR_EV_RXSEG event.
HS FTP library is designed for single threaded, event driven environment, and includes built in socket interface layer library for asynchronous Win32 TCP/IP communications, the source code for which is also provided.
HS FTP C Source library has flexible modular architecture, portable to any OS with minimal or no effort.
The underlying socket interface module HS SOCK provides support for TCP and UDP non blocking mode socket operation for both outbound and listening connections.
HS FTP allows concurrent FTP session operation. The number of sessions is limited to 32 in the current version.
Hillstone Software provides additional services for customization, porting and integration of the library code to better suit the needs of your products