[Mono-bugs] [Bug 421589] New: Incorrect behavior of NetworkStream.Read and/ or NetworkStream.DataAvailable
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Aug 29 12:45:45 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=421589
Summary: Incorrect behavior of NetworkStream.Read and/or
NetworkStream.DataAvailable
Product: Mono: Class Libraries
Version: 1.9
Platform: 64bit
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: zarevucky.jiri at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: Community User
Description of Problem:
The Read function is reading all data from the underlying socket, even when
user only reads smaller amount of data from the stream. This wouldn't be a
problem alone. However, DataAvailable function doesn't check for data in the
internal buffer, so you can't find out, if there are any data left without
reading (and eventually blocking execution).
Steps to reproduce the problem:
1. Creating and connection of socket.
2. Creating new NetworkStream.
3. Sending big amount of data to the socket.
4. Reading the data via NetworkStream with smaller buffer.
Actual Results:
socket.Available == 0 and stream.DataAvailable == false
Expected Results:
stream.DataAvailable == true; possibly leaving unnecessary data in the socket
How often does this happen?
always
Additional Information:
I can't test this with MS .NET, but this behavior is inlogical, so I guess it's
incorrect.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list