dotnet / dotnet/dotnet-api-docs
Concerns on TcpClient docs and samples and some NetworkStream properties
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
Take a serious look at the example and tell me how useful it is??
What happens if you receive an error, how is that going to close client or stream?
What happens if you receive a message you have to process in a loop because it is longer than 256 bytes?
How come no use of using block even thought both cleint and stream implement IDisposable?
What is the purpose of CanRead, CanWrite if by default they are set to true once NetworkStream is initiated? It seams it is risky to use them since they are leaving impression data is ready yet they are set on initiation of stream?
What is the purpose of DataAvailable - this is not clear from documentation?
All example relating to networkstream and tcpclient are very poorly explained and demonstrated without much useful explanation. The entire area feels like bare-bone unfinished document
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 773e9cd8-9c5b-39ad-0658-e01d3cdbd3e5
* Version Independent ID: 9eb4ed4f-205b-1779-5584-c47bfbce4c88
* Content: [TcpClient Class (System.Net.Sockets)](https://docs.microsoft.com/en-us/dotnet/api/system.net.sockets.tcpclient?view=netframework-4.7.2)
* Content Source: [xml/System.Net.Sockets/TcpClient.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Net.Sockets/TcpClient.xml)
* Product: **dotnet-api**
* GitHub Login: @karelz
* Microsoft Alias: **ncldev**
Contributor guide
Assessment
This issue has not been assessed yet.