lua-users home
lua-l archive

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


A quick test on a friend's mac shows that on OSX the
behaviour is again different: on failure select returns,
and connect returns nil,"connection failed", while on
success select also returns, but connect returns
nil,"already connected". Am I hitting some undefined use
case of the BSD sockets API ?

This is the expected behavior.  "Already connected" is an
error message that means there is no error. It is what you
should get in this case and means connection succeeded.
The failure you are getting is hitting you so quick that
select is returning right away, so no problem there either.

Can you tell me more about the error you get when you try to
call connect() again on Windows?