[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Asynchronous socket library?
- From: Ralph Hempel <rhempel@...>
- Date: Tue, 24 Mar 2009 13:49:07 -0400
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
(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
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.