lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Have you taken a look at Luvit?

Less a "function" but a system that is designed for tasks just like this.

https://github.com/luvit/luvit

On Fri, Mar 9, 2012 at 8:58 AM, wladyslaw motyka <trax100@gmail.com> wrote:
> Hi Lua geeks,
>
> I need to do a function to download multiple files asynchronously by using
> LuaSockets and Corutines (Copas?) and by using ltn12.sink.file. Do you have
> any examples of such script.
>
> For example:   http.request{ url =
> "http://www.google.com/logos/2012/iguacu12-hp.jpg", sink =
> ltn12.sink.file(io.open("/tmp/iguacu12-hp.jpg","wb")) }
>
> I have really troubles with joining it all together.
>
> Please could you help me?
>
> Best regards,
> Wladyslaw Motyka