Overview
HS Download is an HTTP client library and Web download SDK for Windows and Linux. HS Download is implemented in C/C++ and allows a programmer to download files from web servers using a standard DLL API or HTTP client C static library.
HS Download Library can be used from C/C++, C Sharp, VB or other languages. A programmer can use a standard windows DLL interface, a C Sharp wrapper DLL exposing a .NET class or a static HTTP client C library directly from a C/C++ application on Linux or Windows
HS Downloaded Library is supported on both 32 bit and 64 bit platforms
HS Download supports Basic HTTP authentication and Digest HTTP authentication.
HS Download supports both standard HTTP and secure HTTPS file downloads
List of RFCs: selected features of RFC2616 (HTTP 1.1), RFC2617 (HTTP Authentication: Basic and Digest Access Authentication)
HS Download Library is Royalty Free.
Features
- HTTP and HTTPS client operation
- Download files asynchronously
- Multiple concurrent HTTP download sessions (maximum 62)
- HTTP Client library downloads files in its own threads, so that the caller's UI thread is not blocked
- Easy to use API for C/C++, C Sharp, VB and other languages
- Runs on Windows and Linux
- Full C source code and sample applications included for Windows and Linux
Details of HTTP Client Library Implementation
Conceptually a user application performs all work with the HS Download library in a sequence of operations. The API syntax depends on if a standard DLL API, a C Sharp wrapper API or a static C library API is used. These operations are:
- Initialize library (HsDownloadInit / HsDownloadDllInit / HsDownloadDllInitCs)
- Open file download (HsDownloadOpen / HsDownloadDllOpen / HsDownloadDllOpenCs)
- Periodically check for status (HsDownloadStatus() / HsDownloadDllStatus / HsDownloadDllStatusCs
- Close file download (HsDownloadClose / HsDownloadDllClose / HsDownloadDllCloseCs)
- De-Initialize library (HsDownloadCleanup / HsDownloadDllCleanup / HsDownloadDllCleanupCs)
Initialization and Cleanup API functions are called once at program startup and exit. The Open, Status and Close functions are called for each download session. Several (up to 62) HTTP file downloads can be started simultaneously
When processing the Open API function, the HTTP client library connects to HTTP or HTTPS server, builds and sends the HTTP request buffer and starts to receive the HTTP response buffer.
The HTTP response sent by server contains HTTP headers that include the result code and some other important information such as binary file size. The comple file body follows the HTTP headers.
The HS Download library implements the necessary functionality to correctly receive the file and maintain the status information for reporting to the application
The "close" API function either aborts the file download in progress or simply de-allocates an HTTP session context of a session for which the file download has succesfully completed.
API Summary
- HsDownloadInit
- HsDownloadCleanup
- HsDownloadOpen
- HsDownloadClose
- HsDownloadStatus
HS Download Library Architecture
Modular design makes it easy to port and adapt HS Download library to any environment. HS Downlaod SDK includes: HsDownloadDll (standard DLL) HsDownloadDllCs (.NET DLL class for use from C Sharp and VB .NET), HsDownloadLib (static C library which implements HTTP Client), HsSock (socket Interface library fo Winsock and Unix BSD sockets), HsUtil Utility library, Demo applications (both command line and GUI style) for Windows and Linux (in C and C Sharp)
Secure HTTP (HTTPS) Implementation Details
HTTPS is implemented using OpenSSL toolkit. Support for SSL / TLS is implemented in HsSock library (included with HS Download SDK)
HsSock library has a compile option to incude SSL support or not. Is SSL support is compiled in, HsSock library interfaces to OpenSSL API in order to manage SSL connections, secure negotiation and data encryption and decryption.
OpenSSL binaries are supplied with HS Download Demo applications.
SSL support is optional and it is possible to use HS Download without OpenSSL. To do that HsSock compile option must be changed not to include SSL support.
* This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit
Customization
Hillstone Software provides additional services for customization, porting and integration of the library code to better suit the needs of your products
