lua-users home
lua-l archive

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


Rob Kendrick wrote:
On Tue, 24 Mar 2009 09:41:12 -0700
"John Dunn" <John_Dunn@qscaudio.com> wrote:

The goal is to allow our  users to write scripts which interact with
devices on the network (1) without having to learn the Berkley sockets interface
  (2) ensure that their script don't block execution for too long a
time

  (3) without having to understand coroutines and yield()

  (4) run on both Win32 and Linux platforms

This sounds almost precisely like what LuaSocket provides.  It's a
higher-level interface than Berkley (very easy to get going with),
supports non-blocking calls (ie, select), doesn't require you to use
co-routines, and works on Windows as well as Linux.

I've used LuaSocket extensively to interface to a product
that exposes an API over TCP and it's dead easy, customizable, and
reliable.

Using select() and some coroutine/yield magic might help in terms
of CPU usage, but they are actually fairly easy to manage once you've
used them a few times.

Ralph