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: [email protected]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]
          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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to