-
Notifications
You must be signed in to change notification settings - Fork 13
Home
"libcurl is a free and easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP. libcurl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, Kerberos), file transfer resume, http proxy tunneling and more!" (http://libcurl.org/)
The porting project intended to be used as a subproject of your project. It downloads one of the last versions of the CURL, configures it to use under the AirplaySDK environment, and includes library source files into your application. Prebuilt library packages will be introduced later.
You must download and install Configure Extension for Marmalade environment before using a project.
The CURL is a rich library supporting many protocols. Some of them require third-party libraries which should be ported themself. Therefore, the actual project configuration includes only main part of protocols. The excluded (yet) protocols and features:
- LDAP - (http://www.openldap.org/)
- IDN support - (http://www.gnu.org/software/libidn/)
- Kerberos support - (http://web.mit.edu/kerberos/)
- SSL support - (http://www.openssl.org/)
- SASL support - (http://cyrusimap.web.cmu.edu/)
- TLS support - (http://www.gnutls.org/)
Therefore, LDAP and all security features and secure protocols are excluded now. You can port these libraries yourself and change CURL configuration files accordingly. The CURL library can be built against several implementations of third-party libraries supporting these features, here I listed only those of them which are linked against CURL on my Linux host. Look to the CURL installation guide to get more details, what third-party libraries are supported.
The custom asynchronous resolver which uses AirplaySDK-native s3eInetLookup() call is implemented as a replacement for the c-ares library which is able to be linked to the CURL as an option. As a result, the CURL library uses my replacement, and passes all resolving jobs to it.
The original c-ares asynchronous resolver may be now linked to the CURL as an option, instead of fake-ares. Just copy libcurl-cares.mkf to libcurl.mkf and use the library as described above. Note that c-ares requires data/etc/resolv.conf file to be present in your application. Also I've found that the c-ares is not working on Windows Mobile 6.1.
NOTE: Using libcurl is not yet stable. I've found that the libcurl sometimes causes application crash, especially when using asynchronous resolver. Detailed description of the problem may be found here. Deep investigation of the problem makes me sure that the problem is caused by the marmalade socket subsystems, either posix layer, or s3eSocket layer. The problem happens on the connection stage, when two or more sockets are reporting about successful connection simultaneously. Serializing connection phase on the application level helps to make application stable. Concurrent data transferring is stable anyway.
The CURL API Documentation Page contains details about using CURL calls. A lot of examples also available there. Use these examples having in mind platform restrictions listed above. You can also read my recommendations to get breaf introduction to IMHO most important things concerning to the CURL.