lua-users home
lua-l archive

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


Hi,

Please check the thread at

   http://lua-users.org/lists/lua-l/2008-06/msg00074.html

This is officially a FAQ, why not add it to the docs?

Because if I added it to the docs, I would say it can't be
done and it's not supported. :/

Diego - I read through the buffer code... still no idea what dirty() is for.

Reading is buffered. So you may have asked for one line from
a socket, and yet I got 10 lines worth of data from the OS
in a single call. I return you only the first line, and keep
the rest for the future. Now you select on the socket. As
far as the OS is concerned, there may not be data to be
read. But LuaSocket has unread data to give you, so I don't
even call select on that socket. Got it? The dirty() method
tells me when not to bother with a socket.


[]s,
Diego