|
On 26 Aug 2013 09:12, "William Ahern" <william@25thandclement.com> wrote:
>
> On Sun, Aug 25, 2013 at 08:20:25PM +1000, Choonster TheMage wrote:
> > Does anyone know of any examples of asynchronous HTTPS requests in
> > Lua? I've seen some examples of asynchronous HTTP using LuaSocket, but
> > nothing with LuaSec for asynchronous HTTPS requests.
> >
> > I'm writing a Lua interface[1] to a RESTful web API[2] which requires
> > HTTPS requests for authenticated users. I'm looking into what it would
> > take to rewrite the library to use asynchronous requests instead of
> > synchronous ones.
>
> My cqueues library supports this:
>
> http://25thandclement.com/~william/projects/cqueues.html
>
> But it doesn't use LuaSocket or LuaSec. See cqueues/src/lib/socket.c for how
> it uses the OpenSSL library. Specifically, so_starttls_, so_read, and
> so_write.
>
That looks quite interesting, but unfortunately I'd like to support both Windows and Unix systems.
On 26 August 2013 16:04, Ross Bencina <rossb-lists@audiomulch.com> wrote:
>
> On 25/08/2013 8:20 PM, Choonster TheMage wrote:
>>
>> Does anyone know of any examples of asynchronous HTTPS requests in
>> Lua?
>
>
> For another non-luasocket async networking option you could look at luvit
> (http://luvit.io/)
>
> I believe that there is also a libuv binding for non-luajit Lua developed by
> the same guy(s).
>
> Ross.
>
I'll take a look at luv, thanks. There are a few bindings of libuv around.