Concerning System.Net.TcpClient
I was wondering if it is possible to perform an individual shutdown on the outputstream or inputstream from a TcpClient
.
I know, that the NetworkStream
can be grepped with aTcpClient.GetStream()
however, I am still figuring out to Close()
the inbound or outbound part of it, without closing the entire Networkstream.
This is possible with the more basic System.Net.Socket
class in which I could first send data and afterwards close it with SocketShutdown.Send
while keeping the inputstream open untill I close it with SocketShutdown.Receive
.
Reference links:
TcpClient has a Client
property, which is of the type Socket
.
Use the property to get Socket
, so you can call Shutdown()
.