Den 18-06-2011 22:52, Jimmy Cao skrev:
Would an SMTP protocol struct be beneficial?
My immediate goal is to provide HTTP support and basic FTP support through libcurl. I believe these are the most important protocols to get in place in order to improve the adoption of D.
I have currently no plans of adding more protocols to the curl wrapper. Patches are welcome :)
I would rather do some work on native async net support since I believe that would give better performance.
/Jonas
This looks great, thanks for you work. On Sat, Jun 18, 2011 at 3:36 PM, jdrewsen <jdrew...@nospam.com <mailto:jdrew...@nospam.com>> wrote: Hi, I've finally got through all the very constructive comments from the last review of the curl wrapper and performed the needed changes. Here is the github branch: https://github.com/jcd/phobos/__tree/curl-wrapper <https://github.com/jcd/phobos/tree/curl-wrapper> And the generated docs: http://freeze.steamwinter.com/__D/web/phobos/etc_curl.html <http://freeze.steamwinter.com/D/web/phobos/etc_curl.html> I do have some problems getting ddoc to show the documentation of mixins. So in order to view the doc for byLine/byChunk methods you have to look at the source. Anyway...this is what I've been up to: New features: * Full support for async/sync by line/chunk * FTP support extended from only allowing download of a file sync into full async/sync by line/chunk support * Allow providing parameters such as credentials/timeouts when using the convenience statis methods. Changes caused by last review: * rethink byLine/... to not return string in order to prevent allocations. they should return char[]/ubyte[] * 80 chars * Http.Result not HttpResult * gramma for http.postData * len -> length * perform http request -> perform a http ... * authMethod to property * curltimecond alias into module * followlocation -> maxredirs * http not class anymore but struct * timecondition use std.datetime * timeouts use core.duration * Spelling "callbacks is not supported" * refer to HTTP RFC describing the methods * login/password example * chuncked -> chunked * max redirs; use uint.max and not -1 * isRunning returining short * 4 chars tabs in examples. * no space in examples. * Send/recv use special structs in order not to mess with other communications Comments are welcome. /Jonas