Skip to content

Delete wrong/oudated note #4486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions xml/System.Net.Sockets/TcpClient.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1625,9 +1625,6 @@ The `GetStream` method returns a <xref:System.Net.Sockets.NetworkStream> that yo

You must call the <xref:System.Net.Sockets.TcpClient.Connect%2A> method first, or the <xref:System.Net.Sockets.TcpClient.GetStream%2A> method will throw an <xref:System.InvalidOperationException>. After you have obtained the `NetworkStream`, call the <xref:System.Net.Sockets.NetworkStream.Write%2A> method to send data to the remote host. Call the <xref:System.Net.Sockets.NetworkStream.Read%2A> method to receive data arriving from the remote host. Both of these methods block until the specified operation is performed. You can avoid blocking on a read operation by checking the <xref:System.Net.Sockets.NetworkStream.DataAvailable%2A> property. A `true` value means that data has arrived from the remote host and is available for reading. In this case, <xref:System.Net.Sockets.NetworkStream.Read%2A> is guaranteed to complete immediately. If the remote host has shutdown its connection, <xref:System.Net.Sockets.NetworkStream.Read%2A> will immediately return with zero bytes.

> [!NOTE]
> You must close the `NetworkStream` when you are through sending and receiving data. Closing <xref:System.Net.Sockets.TcpClient> does not release the `NetworkStream`.

> [!NOTE]
> If you receive a <xref:System.Net.Sockets.SocketException>, use <xref:System.Net.Sockets.SocketException.ErrorCode%2A?displayProperty=nameWithType> to obtain the specific error code. After you have obtained this code, you can refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.

Expand Down