[Mono-bugs] [Bug 75526][Wis] New - StreamReader.Read(char[], int, int)

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Jul 11 07:43:20 EDT 2005


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 gnauck at ag-software.de.

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

--- shadow/75526	2005-07-11 07:43:20.000000000 -0400
+++ shadow/75526.tmp.25766	2005-07-11 07:43:20.000000000 -0400
@@ -0,0 +1,39 @@
+Bug#: 75526
+Product: Mono: Class Libraries
+Version: 1.1
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: gnauck at ag-software.de               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: StreamReader.Read(char[], int, int)
+
+while debugging my library under windows i stumbled of following.
+I create a new StreamReader from a NetworkStream for parsing Xml.
+
+StreamReader sr = new StreamReader(myTcpClient.GetStream());
+
+When i call:
+sr.Read(myCharBuf, 0, 1024)
+and in the StreamReader are less than 1024 Byte available
+MS .NET reads all the available bytes and returns immediately.
+MONO blocks until 1024Bytes are available in the Stream or the Stream gets
+closed.
+It would be cool when MONO and MS .NET would have the same behaviour here,
+because my code is based on this MS .NET behaviour. Or if some code expects
+the MONO behaviour then i has problems under MS .NET.
+Its hard to write a test case here because i have the problem only when
+parsing Networks streams. So you would need a server and a client sample to
+cause this problem.
+If you read only a single byte with sr.Read() and no more data is available
+in the Stream it blocks on MONO and MS .NET which is OK.
+
+Alex


More information about the mono-bugs mailing list