[MLton] Socket.connectNB on NetBSD
Henry Cejtin
henry@sourcelight.com
Tue, 18 Nov 2003 21:07:15 -0600
No, I think you misunderstood me. The point is that the connect can return
-1 even if the connection will succeed. The point is that given that the
socket is non-blocking, it doesn't want to wait around to see if it will
succeed.
I think that if you do a connect, it can either return success or else
failure with errno EAGAIN. Then you can select on it (or loop, or what
ever) and eventually it will return success. The same if you are trying
to connect on some socket that the machine is not listening on, but then
replace success with failure with some errno other than EAGAIN.