lua-users home
lua-l archive

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


> If you are using Lua 5.0, than you should be using the alpha version of
> the library at
>
>     http://www.tecgraf.puc-rio.br/~diego/luasocket/new/
>
> and the function is described at
>
>     http://www.tecgraf.puc-rio.br/~diego/luasocket/new/tcp.html#settimeout
>
> Both entries are available from the index.
>
...therein lies my problem.  Google returned a result that pointed me to
the 4.0 page.

My problem is that a timeout resolution of a 1 second is way too coarse.
It would mean that if there was no data available to receive, the
simulator would stop for a full second after every simulation frame.

Is there are a way to configure select() turn return _instantly_ if there
is no data available?

In the description for settimeout() there is this :

"Note: although timeout values have millisecond precision in
LuaSocket,..."

Does this mean that settimeout() will accept fractional second values
such as settimeout(.10) as being valid for a 1/10th of a second timeout?

Thanks!

g.