Are NetworkStream.ReadAsync and WriteAsync cancelled when the TcpClient disconnects?

33 views Asked by At

I am using both methods. I wouldn't like to keep waiting to, e.g., receive and read a message in case the client disconnected. So I was wondering if I should give them a manual time out or if I can rely on this happening automatically.

0

There are 0 answers