Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

NetworkStream.Write Exception

$
0
0

I am write a client app with TcpClient.
The exception's steps like this:
1. TcpClient connect to server success.
2 .Get NetworkStream from TcpClient success.
3. NetworkStream.Write success.
4. The server app close the connection.
5. NetworkStream.Write got a exception like the picture show.

I know the problem reason is the TcpClient connection lost but the TcpClient don't known.
The TcpClient first known the connection lost is from the NetworkStream.Write call.

The question is when the connection lost, how to detect it and how to handle it.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>