lua-users home
lua-l archive

Re: Strange experiences with coroutines while using Copas

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


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

AltStyle によって変換されたページ (->オリジナル) /