Overview
HsFtpWM is a software library for Windows Mobile OS. It is written in C and implements the client side of the File Transfer Protocol over TCP socket layer according to RFC 959.
HsFtpWM is offered with full C source code and includes C library binaries and C Demo applications, executables and source code, built from Microsoft Visual Studio 2005 for Windows Mobile OS, plus HS FTP programming manual.
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, NOOP, PWD, RNFR, RNTO.
HSFTPWM 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 HsFtpWM C Source Library is Royalty Free.
Features
- FTP Client RFC 959 operation
- Server name resolution
- Concurrent FTP client sessions
- Passive mode, firewall friendly
- User / password authentication
- Asynchronous Operation
- Supported FTP Commands: USER, PASS, PASV, LIST, TYPE, RETR, STOR, CWD, MKD, RMD, DELE, NOOP, PWD, RNFR, RNTO
- Recursive Folder Download
- Recursive Folder Upload
- Recursive Folder Delete
- Configurable Timeout
- Transmit and Receive Statistics
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 user event callback function with HS_FTPCLI_USR_EV_LOGGEDIN event.
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 event callback with corresponding events.
HsFtpWM 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 by a define in the header file which can be bumped up for the required value, depending on functional requirement and memory restrictions.
Customization
Hillstone Software provides additional services for customization, porting and integration of the library code to better suit the needs of your products
