[Mono-bugs] [Bug 38136][Nor] Changed - System.Net.Sockets.Socket exception when connecting
Sun, 16 Feb 2003 05:31:39 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by firstname.lastname@example.org.
--- shadow/38136 Sat Feb 15 23:24:06 2003
+++ shadow/38136.tmp.23775 Sun Feb 16 05:31:39 2003
@@ -160,6 +160,16 @@
invoking the callback.
The other alternative (catch the exception, check for the
WSAEINPROGRESS error code and Poll ()) has one problem. How do I know
if the socket is actually connected? And if not, which error code
should i set in the exception thrown?
+------- Additional Comments From email@example.com 2003-02-16 05:31 -------
+Did you Poll(), wait for it to return, then try the Connect()
+(catching exceptions)? Poll will return read/write ready when connect
+completes, so if Poll() returns and Connect() succeeds, the socket is
+connected. If Poll() returns and Connect() still fails with
+EINPROGRESS, then we'll just have to rethrow the exception I think.
+Alternatively, we could implement WSAEventSelect(), which can set an
+OS event when the connect completes.