lua-users home
lua-l archive

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


On Sep 19, 2011, at 8:12 PM, Tim Caswell wrote:

> I don't know much about lua's standard network API's,

There is none., but LuaSocket is the closest to it:

http://w3.impa.br/~diego/software/luasocket/

But not necessarily suited for server side application. YMMV.

> but I'm working on
> binding to libuv (the network layer in nodeJS) to LuaJIT. <
> https://github.com/creationix/luanode>
> 
> It's still a ways off, but it should make building the network half of such
> servers really easy.  

Or one could outsource the entire networking part to something like tcpserver [1] or such.

On the other hand, sometime it's not so straightforward to decouple the networking from the protocol itself (e.g. STARTTLS). Sigh.

> Any parser logic can be shared as long as it's
> implemented to not do I/O itself.

Well, a parser need to read some input, write some output, manipulate the network connection.

[1] http://cr.yp.to/ucspi-tcp/tcpserver.html