[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LuaSocket - non-blocking connect ?
- From: Diego Nehab <diego@...>
- Date: Fri, 29 May 2009 21:13:53 -0400 (EDT)
I would like something like:
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".