lua-users home
lua-l archive

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


Hi,

I am not sure what level of control you want, but I agree the current
API is only "almost" there. To use non-blocking I/O all the way, a few
changes would be needed in the socket.source/socket.sink functions.
These don't expect to receive timeout errors from their underlying
socket object and that would probably happen with non-blocking I/O.

Then, the support for tapping downloads or uploads comes in the form of
a pump.step function you can pass to http.request (notice that
socket.source/socket.sink can be passed directly to select) .  Right now
the process is passive and there is not much control-flow freedom, i.e.
the function you provide will be called repeatedly. But perhaps if you
use coroutines...

What did you have in mind?

[]s,
Diego.

PS: There is a paper dead-line comming up, thus my disappearance.