Il 17/12/2011 22:01, Evan Nemerson ha scritto:
> On Sat, 2011-12-17 at 14:46 +0100, Giulio Paci wrote:
>> Il 16/12/2011 19:55, Rodrigo Herefeld ha scritto:
>>> I've found a goodie, i needed to use libcurl in a vala program, just to
>>> fetch a file regulary from the internet,
>>> after some searching i end up doing that:
>>>
>>> i write all the curl thing in a c program , then i wrote a function that
>>> makes the connection and return
>>> the content of the file.
>>> in vala i wrote
>>>
>>> exter  char[] my-curl-fun-in-c();
>>> and called that from vala where i needed
>>>
>>> compile like that:
>>> valac valasource.vala csource.c -X -l curl
>>
>> Hi, thank you for the tip.
>>
>> Maybe this is a bit off-topic for this thread, but I am writing a
>> libcurl.vapi file here:
>> https://github.com/giuliopaci/ValaBindingsDevelopment
> 
> Why not use libsoup?
> 
> I'm not saying you should use libsoup... I'm guessing you have your
> reasons for not doing so and I'm genuinely curious about what they are.

Well, actually I am not sure about this: when I started writing the vapi
my goal was learning to write a vapi file, while trying to learn
something else (i.e., how to use libcurl).

One of the thing that I like in libcurl is that you can easily test
things using the curl program, which I know quite well.
Before writing the libcurl vapi file I just compared the features
reported on the libsoup and libcurl homepage: libcurl seems to be more
complete and supports much more than HTTP, so for me it was worth to
invest time on it.
What libcurl is missing is a server API, but there are a lot of other
libraries for that.
In my opinion if you just need an HTTP client both libsoup and libcurl
can be used. If you need an HTTP client and a simple server, probably
libsoup is a better alternative. If you need anything more, probably
libcurl + some other library is the best option, but my opinion is based
only on the homepages of those two libraries.

Bests,
        Giulio.
_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to