[Mono-bugs] [Bug 79878][Maj] Changed - BeginConnect/EndConnect for Socket does not work correctly on connection error

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jan 17 13:25:44 EST 2007

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 benoit at zeroc.com.


--- shadow/79878	2007-01-17 12:19:59.000000000 -0500
+++ shadow/79878.tmp.3563	2007-01-17 13:25:44.000000000 -0500
@@ -114,6 +114,29 @@
 Could you point me directly to the Ice tests?  (The directory in the
 source tar is fine.)
 I looked at the DJB page, but I don't think any of the techniques he
 listed is suitable for mono.  I'll have a look at only checking the
 SO_ERROR state if connected == false though.
+------- Additional Comments From benoit at zeroc.com  2007-01-17 13:25 -------
+Ice for C# can be downloaded here http://www.zeroc.com/download/Ice/3.1/
+IceCS-3.1.1.tar.gz. If you want to run the tests you'll first have to download and compile 
+Ice for C++ (check http://www.zeroc.com/download) and then Ice for C# (the tests can 
+then be run with the IceCS-3.1.1/allTests.py script) at the root of the  source distribution 
+The Ice for C# code I mentioned is in the src/Ice/Network.cs file, the doConnect method. 
+This code was working fine prior to this fix because GetSocketOption returned the socket 
+error (and this broke the IceCS-3.1.1/test/Ice/binding test which expects an 
+Ice.ConnectionRefusedException rather than a Ice.ConnectionFailedException from 
+For our next release, I've workaround the problem by using BeginConnect/EndConnect for 
+Mono (I'm still using Select/GetSocketOption for .NET though because I couldn't get 
+BeginConnect/EndConnect to work on .NET for some reasons, I can't remember the details 
+I thought the technique of calling getpeername() and then read(fd,&ch,1) if getpeername 
+returned ENOTCONN could eventually work but I didn't try it and I'm sure you know better! 
+(it's sounds a bit hacky too...)

More information about the mono-bugs mailing list