lua-users home
lua-l archive

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


Hi Mike,

With this fix, the ecopas.lua test script seems to run just as well as
the eserver.lua test script.  And (after a bit of fiddling) so does my
application.  Thanks!

-Chris

On Mon, 22 Aug 2005 13:42:52 +0200
Mike Pall <mikelu-0508@mike.de> wrote:

> Hi,
> 
> Eric Jacobs wrote:
> > This could also be considered a bug in LuaSocket (if it should
> > count the results of the previous read as part of the current
> > read); maybe the API needs to be hammered out a bit more?
> 
> I think the API is ok. The 'part' argument is used for
> accumulating the result. But there's a bug in 2.0-beta3:
> the size of the partial result is not taken into account.
> 
> Fix for buffer.c, buf_meth_receive():
> 
> -     } else err = recvraw(buf, (size_t) lua_tonumber(L, 2), &b);
> +     } else err = recvraw(buf, (size_t) lua_tonumber(L, 2) - size,
> &b);
> 
> Bye,
>      Mike