Skip to content

Commit f544d12

Browse files
authored
Delete wrong/oudated note (#4486)
1 parent 2e193b9 commit f544d12

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

xml/System.Net.Sockets/TcpClient.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,9 +1632,6 @@ The `GetStream` method returns a <xref:System.Net.Sockets.NetworkStream> that yo
16321632
16331633
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.
16341634
1635-
> [!NOTE]
1636-
> You must close the `NetworkStream` when you are through sending and receiving data. Closing <xref:System.Net.Sockets.TcpClient> does not release the `NetworkStream`.
1637-
16381635
> [!NOTE]
16391636
> 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.
16401637

0 commit comments

Comments
 (0)