Doug Turner wrote:
>>> * Removed Available() call in OnDataAvailable. We should just
>>> the byte count that was passed to us.
>>>
>> agreed. I wonder if Available() is of any use?
>
>
> Ugh. all over the place. It is all wrong too. Do a lxr search for
> OnDataAvailable(). The result from Available() does not always yield
> the same value as what the read/write count is. If you read over this
> count, you may block or possible (In passing darin mentioned this to
> me) screw up the internal buffering. I wrote up a bug but can not
> find it right now.
>
Sure. I know it's used everywhere, I was just wondering if all the usage
cases are just after an OnDataAvailable() call (where they could easily
be removed). I believe there are places that call Available() inside a
loop (which is bad anyway) in a single OnDataAvail() callback to try and
mimic a blocking read :-/
>>> * Need some perf verification
>>>
>> Are you going to do this whitebox w/ programmatic timing (clock
>> checks in the download code?)?
>
> I was going to use TestProtocols.
perfect.
Jud