[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: socket select() question
- From: Edwin Eyan Moragas <haaktu@...>
- Date: Tue, 13 Dec 2005 14:00:52 +0800
this question is supposed to be for Diego and the LuaSocket guys.
however, it's more on the C side rather than Lua. i'm apprehensive on
mailing Diego directly. besides, others might also be interested. here
select() accepts a two tables. one for those that can be wriiten to
without blocking and another that can be read fronm without blocking.
if i read from a file descriptor and my buffer isn't big enough to
contain all that is read:
1.1) how will i know that there's still more to read from the file/socket?
1.2) do i have to read again from the file descriptor or is it safe to
pass it back again to select?
from the Luasocket reference:
"Another important note: calling select with a server socket in the
receive parameter before a call to accept does not guarantee accept
will return immediately. Use the settimeout method or accept might
2.1) is this applicable to all platforms?
that's it for now.