reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Weimer <mar...@weimo.de>
Subject Re: C# NetworkStream.close() behavior
Date Thu, 09 Jun 2016 15:07:45 GMT
On 2016-06-08 18:24, Dhruv Mahajan wrote:
> It seems that even of read==0, there are bytes left to read. My
> understanding on reading the documentation was that no further data
> is available since stream is closed. Any idea where am I going
> wrong?

The documentation[0] states:

> Instead of calling this method, ensure that the stream is properly
> disposed.

So, you might want to use `.Dispose()` instead?

Markus

[0]: 
https://msdn.microsoft.com/en-us/library/system.net.sockets.networkstream.close%28v=vs.110%29.aspx

Mime
View raw message