[Gambas-devel] Curl library
Benoit Minisini
gambas at ...1...
Tue Dec 30 16:36:00 CET 2003
On Tuesday 30 December 2003 00:01, Daniel Campos wrote:
> Hi Benoît:
>
> Probably the January 2, I'll have time to restart my work. I've
> thinking a little, and may be protocols like FTP are too wide to be
> implemented in a reasonably time, so at least while some new classes
> can be implemented fully in my own code, I was thinking to use
> libcurl to implement a FTP/FTPS client, a TELNET client, and to add a
> decent support for Proxies and HTTPS to current classes :
>
>
> http://curl.haxx.se/libcurl/
>
> This library has many bindings, and seems to be stable and well-tested
> by a lot of people, and has been ported to lot of platforms, so I
> suppose it will give stability to the new classes in few time. May be in
> the future references to libcurl could be replaced for native code, (if
> it provides any advantage)
>
I have heard about this library. Using idea would be a great idea ! With it,
you will be able to enhance your component easily.
> Tell me something about the prioritys of "net" component ("HTTPS",
> "FTP", etc) for Gambas.
I think you should improve HttpClient so that you can receive and send
cookies, and then, for after 1.0, you will use libcurl to provide a sort of
"Curl" stream object, with many of the curl option. I think I will insert a
protocol detection in the OPEN keyword, and a Gambas API that allow
components to register a protocol. This way, you component will tell the
interpreter that it can handle http/ftp/https... protocol, and then it will
receive all OPEN request using this protocol.
OPEN "http://www.google.fr" FOR READ AS #hFic
==> call your function in the net component, that will create a File object
with a stream that will call in return the libcurl.
I describe that quickly, but I must think more about it before having a real
and clean implementation of this concept.
For example, hFic must be a more complex object than a File, to handle post
request, and other curl option. So OPEN must be modified to return something
other than a File object.
>
> Regards,
>
> Daniel Campos
Regards,
--
Benoit Minisini
mailto:gambas at ...1...
More information about the Devel
mailing list