[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Basic question about LuaSocket and sleeping
- From: Matthew Wild <mwild1@...>
- Date: Sat, 22 Sep 2012 19:20:41 +0100
On 22 September 2012 19:01, Thijs Schreijer <thijs@thijsschreijer.nl> wrote:
> For an implementation using timers with a scheduler checkout CopasTimer
> (available through LuaRocks). It extends Copas with timer capabilities using
> calculated timeouts (when it calls select, it sets the timeout to the first
> timer expiring, so it returns upon IO or when a timer is due to be
> executed).
> Though Copas is essentially a server (waits for incoming connections), it's
> simple to add outgoing connections. I think the method is called addtask()
> or newtask() or something similar. The Copas documentation (on github,
> master, not released yet) contains an example I added a while ago. Dunno
> what you need, but UDP support is also in master, not released yet.
Mmm, sounds great. I would love to see an official Copas release with
a simple client API and timers. It really shows off the best of Lua's
potential when it makes asynchronous network programming so trivial.
Regards,
Matthew