[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: copas timeout?
- From: Petite Abeille <petite.abeille@...>
- Date: Sat, 13 Jun 2009 19:57:01 +0200
On Jun 13, 2009, at 7:27 PM, Eike Decker wrote:
I am writing a tiny webserver which is now also supporting the
keepalive feature of HTTP/1.1.
In practice, I found it more convenient to handle such time out
outside of Lua, i.e. using timelimit  or such.
For example, using tcpserver  and HTTP.lua :
tcpserver -c 100 -qRHlOD 0 3388 timelimit 60 lua Nanoki.lua .
In other words, tcpserver will start a time limited Lua process for
every new connection.
The above setup is how the online demo of Nanoki runs:
As far as select and coroutines go... such setup is of limited
practical use if any of the coroutine starts doing any real work aside
from waiting on the network... ymmv of course...