lua-users home
lua-l archive

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


Hi,

I would like something like:
socket.connect(..., cb_function)
Where cb_function receives the connection or nil when failing.

Doing socket.tcp(), setting it to non-blocking, then call connect(),
then selecting on it should work if I recall correctly.

Yes. Select for writing. When select returns, call connect again on the socket to see if the connection succeeded. It should return the error "already connected".

[]s,
Diego