[Mono-bugs] [Bug 28092][Wis] New - EndAccept() blocks for ever

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
22 Jul 2002 21:37:12 -0000


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 roberthahn@epost.de.

http://bugzilla.ximian.com/show_bug.cgi?id=28092

--- shadow/28092	Mon Jul 22 17:37:12 2002
+++ shadow/28092.tmp.24898	Mon Jul 22 17:37:12 2002
@@ -0,0 +1,62 @@
+Bug#: 28092
+Product: Mono/Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: roberthahn@epost.de               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Summary: EndAccept() blocks for ever
+
+public SocketTest()
+{
+    Socket s = new Socket(AddressFamily.InterNetwork, 
+                          
+SocketType.Stream, ProtocolType.Tcp);
+    s.Bind(new 
+IPEndPoint(IPAddress.Loopback, 12345));
+    s.Listen(10);
+    s.BeginAccept(new 
+AsyncCallback(OnAcceptComplete), s);
+}
+
+public void 
+OnAcceptComplete(IAsyncResult ar)
+{
+   Socket s = (Socket) ar.AsyncState;
+   
+Console.WriteLine("Entered callback method.");
+   s.EndAccept(ar);
+   // this line is 
+never reached in mono
+   Console.WriteLine("Connection was 
+accepted.");
+}
+
+
+Actual Results:
+
+With mono EndAccept() does not finish and the 
+program blocks for ever.
+
+Expected Results:
+
+Works fine with the Microsoft 
+runtime.
+
+How often does this happen? 
+
+Always.
+
+Additional Information:
+
+I 
+tried it with the Debian and the Windows version of mono and compiled the program with csc and 
+mcs.