mail-archives/mono-bugs/2005-June/030583.html

195 строки
6.0 KiB
HTML
Исходник Обычный вид История

2019-06-06 22:03:35 +03:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-bugs] [Bug 75306][Cri] New - Socet.Select on Write
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%2075306%5D%5BCri%5D%20New%20-%20Socet.Select%20on%20Write&In-Reply-To=bug-75306%40chernobyl.ximian.com">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="030582.html">
<LINK REL="Next" HREF="030584.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-bugs] [Bug 75306][Cri] New - Socet.Select on Write</H1>
<B>bugzilla-daemon at bugzilla.ximian.com</B>
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%2075306%5D%5BCri%5D%20New%20-%20Socet.Select%20on%20Write&In-Reply-To=bug-75306%40chernobyl.ximian.com"
TITLE="[Mono-bugs] [Bug 75306][Cri] New - Socet.Select on Write">bugzilla-daemon at bugzilla.ximian.com
</A><BR>
<I>Sat Jun 18 09:44:05 EDT 2005</I>
<P><UL>
<LI>Previous message: <A HREF="030582.html">[Mono-bugs] [Bug 75304][Min] Changed - Crash when exiting after
'new TextBox'
</A></li>
<LI>Next message: <A HREF="030584.html">[Mono-bugs] [Bug 75307][Wis] New - xsp parser doesn't understand
itemstyle-font-size attribute in declarative syntax
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#30583">[ date ]</a>
<a href="thread.html#30583">[ thread ]</a>
<a href="subject.html#30583">[ subject ]</a>
<a href="author.html#30583">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>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 <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">ice-k at amnesty.scene.pl.</A>
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=75306">http://bugzilla.ximian.com/show_bug.cgi?id=75306</A>
--- shadow/75306 2005-06-18 09:44:05.000000000 -0400
+++ shadow/75306.tmp.24969 2005-06-18 09:44:05.000000000 -0400
@@ -0,0 +1,124 @@
+Bug#: 75306
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Critical
+Component: System
+AssignedTo: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at ximian.com</A>
+ReportedBy: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">ice-k at amnesty.scene.pl</A>
+QAContact: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at ximian.com</A>
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Socet.Select on Write
+
+After update to 1.1.8 (Win32) version Socket.Select does not working on
+Select Write Mode properly
+After Accepted connecion
+Socket.Select(ConnectionListRead, ConnectionListWrite, null, 100);
+
+ConnectionListRead has two socket availabe for read
+ConnectionListWrite has no socket ready for write
+?
+no problem with older version of runtime and core lib
+
+----------------------------- CODE --------------------------------
+using System;
+using System.Collections;
+using System.Net;
+using System.Net.Sockets;
+using System.Threading;
+
+class SocketTest
+{
+
+ public static int Main()
+ {
+ IPEndPoint ipEndpoint = new IPEndPoint(IPAddress.Any, 80);
+ Socket ListeningSocket = new Socket(ipEndpoint.AddressFamily,
+SocketType.Stream, ProtocolType.Tcp);
+
+ ListeningSocket.Blocking = false;
+ ListeningSocket.Bind (ipEndpoint);
+ ListeningSocket.Listen(1000);
+
+
+ // Pooling
+
+ ArrayList AcceptedClientList = new ArrayList();
+
+ while(true)
+ {
+ Socket Client = null;
+
+ if ( ListeningSocket.Poll(0, SelectMode.SelectRead) )
+ {
+ try
+ {
+ Client = ListeningSocket.Accept ();
+ Client.Blocking = false;
+
+ Console.WriteLine(&quot;Accpet Connection from: &quot; +
+Client.RemoteEndPoint.ToString());
+ AcceptedClientList.Add(Client);
+
+
+ }
+ catch(Exception ex)
+ {
+ Console.WriteLine(&quot;Excpetion: &quot; + ex.Message);
+ }
+
+ }
+
+ if(AcceptedClientList.Count == 0) continue;
+
+ ArrayList ConnectionListRead = new ArrayList(AcceptedClientList);
+ ArrayList ConnectionListWrite = new ArrayList(AcceptedClientList);
+
+ Socket.Select(ConnectionListRead, ConnectionListWrite, null, 100);
+
+ int i = 0;
+
+ foreach ( Socket sock in ConnectionListRead )
+ {
+ Console.WriteLine(&quot;Can Read: &quot; + sock.RemoteEndPoint.ToString() + &quot; i=&quot;
++ i++);
+ }
+
+ i = 0;
+ foreach ( Socket sock in ConnectionListWrite )
+ {
+ Console.WriteLine(&quot;Can Write: &quot; + sock.RemoteEndPoint.ToString() + &quot; i=&quot;
++ i++);
+ }
+
+
+ break;
+
+ }
+
+ return 0;
+ }
+}
+--------------------------- END CODE -------------------------------------
+
+Actual Results:
+Accpet Connection from: 127.0.0.1:1225
+Can Read: 127.0.0.1:1225 i=0
+Can Read: 127.0.0.1:1225 i=1
+
+Expected Results:
+Accpet Connection from: 127.0.0.1:1224
+Can Read: 127.0.0.1:1224 i=0
+Can Write: 127.0.0.1:1224 i=0
+
+
+How often does this happen?
+1.1.8 Windows Version not tested on Unix/Linux Platform
+
+Additional Information:
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="030582.html">[Mono-bugs] [Bug 75304][Min] Changed - Crash when exiting after
'new TextBox'
</A></li>
<LI>Next message: <A HREF="030584.html">[Mono-bugs] [Bug 75307][Wis] New - xsp parser doesn't understand
itemstyle-font-size attribute in declarative syntax
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#30583">[ date ]</a>
<a href="thread.html#30583">[ thread ]</a>
<a href="subject.html#30583">[ subject ]</a>
<a href="author.html#30583">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">More information about the mono-bugs
mailing list</a><br>
</body></html>