[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANNOUNCE]: LuaSocket 2.0 (final) released
- From: PA <petite.abeille@...>
- Date: Thu, 24 Nov 2005 20:26:13 +0100
On Nov 23, 2005, at 23:17, Diego Nehab wrote:
LuaSocket version 2.0 (final) is now available for download! It is
compatible with Lua 5.0 and has been tested on Windows XP, Linux, and
Mac OS X.
Thanks a lot for the update, I was eagerly awaiting for it :)
The build was a snap, so I just went ahead and replaced the previous
binary I was using (beta3).
Out-of-the-box, everything seems to work fine... except that
performances seem to degrade sharply over time. After a couple of
ApacheBench runs, the throughput of my Lua web server drops by over
Only the luasocket binary has changed. Replacing it with the previous
version brings things back to, er, "normal".
How does the "improved:tcp:send(data, i, j)" impacts existing code? Was
it not working the same way in beta3?
Here is my current "send" method:
local anIndex = 1
local aSize = 0
local aRemainder = 0
while true do
anIndex = anIndex + aRemainder
aSize, aStatus, aRemainder = self:socket():send(
aValue, anIndex )
I'm not quite sure what needs to be adjusted (if anything) to make it
work with the new, improved, tcp:send()...
Looking at etc/dispatch.lua, it seems that the send invocation looks
like this now:
first = (first or 1) - 1
local result, error
while true do
result, error, first = tcp:send(data, first+1, last)
Is that what needs to be changed?
I'm quite confused :/
Thanks for any clarifications :)
PA, Onnay Equitursay