RE: FFI, cURL and function callback

  • From: William Adams <william_a_adams@xxxxxxx>
  • To: "luajit@xxxxxxxxxxxxx" <luajit@xxxxxxxxxxxxx>
  • Date: Wed, 27 Mar 2013 16:14:38 +0000

My efforts along these lines can be found here: https://github.com/Wiladams/TINN

My particular focus is on Windows, rather than Linux, but the Windows specifics 
are fairly isolated.  The lowest level of socket calls use a couple of Windows 
extensions.  I am fairly isolated from that lowest level because all the upper 
level stuff uses a "NetStream" class.

If I were to do a UNIX version, I would definitely use ljsyscall, because I've 
effectively created a similar thing for Windows.

As for fend, that's a great project, and could probably benefit from leveraging 
ljsyscall for most of the low level stuff.  One of the greatest things I see in 
fend is the OpenSSL interop layer.  That's a beast of a thing to create, and 
there it is.  Noone else should have to create that, and it should just become 
a standard component.  Perhaps I'll create a module to go with my TINN 
environment, and that would take care of SSL/TLS, although it does rely on 
OpenSSL, and not platform specifics (for Windows).

Picking a fairly efficient http parser would be next on my list at the higher 
levels.  LuaSocket is passable, http_parser is quite functional, but is 'C'.  
My own is pure Lua, as are a few others.  Having a standard one of these would 
be great as well.

That would just leave the development of a great event loop.  Perhaps someone 
who's used to doing massively multiplayer games would volunteer such a thing.


-- William
===============================
- Shaping clay is easier than digging it out of the ground.


________________________________
> Date: Wed, 27 Mar 2013 17:00:54 +0100 
> Subject: Re: FFI, cURL and function callback 
> From: sbronfion@xxxxxxxxx 
> To: luajit@xxxxxxxxxxxxx 
> 
> > If I were to rewrite LuaSocket from scratch today, thinking only of 
> LuaJIT, I would start with ljsyscall, or a similar FFI based shim for 
> the lowest level parts, and build up from there. That would get all 
> the low level socket stuff, without any C code. 
> 
> Make that happen :')                                    

Other related posts: