[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Strange experiences with coroutines while using Copas
- From: Mike Pall <mikelu-0508@...>
- Date: Mon, 22 Aug 2005 13:42:52 +0200
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