[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: New project LuaCURL v1.0 is up
- From: Alexander Marinov <alek@...>
- Date: Tue, 28 Jun 2005 15:41:59 -0700 (PDT)
I guess you are Lua certified, aren't you :P
just a joke! :)
>local c = curl.new():setopt("url", url)
> :setopt("connecttimeout", 15)
I got your point, also what do you think about
or the sugar c.writefunction=function..
and guess how could become if c.__newindex returns self!
Bad idea : ), also I'm not sure if possible
Anyway, your remark is a good point.
>Actually, though, there is a good argument for a different type
>of binding for the writefunction/writedata options. A more
>Lua-like binding would be similar to LuaLDAP, where the perform
>function returns a generator (a "future", if you prefer), and
>the caller can do whatever they want with the resulting strings.
> for chunk in c:perform() do
> table.insert(chunks, chunk)
But you know that always when there is a data stream there is a
problem "who is pushing, who is pulling".
I mean the function returned by c:perform() will "pull" data from curl. But actually curl "push" the data through a callback.
Anyway, this is another good point to think about
>I presume the garbage collector would take care of closing?
>Thanks, again. Looks like it will be very useful.
I thanks for the good remarks.
Get your free email at http://www.crazyland.com