TCP connection quality in .NET.

I have a critical real-time data application that uses a TCP connection between a client and a server. In some cases, a connection periodically dies (SocketException). No problem - just connect and keep going. However, customers are not worried about these intermittent drops in connectivity.

I would like to know where to point my finger. Is it a client or server? Hardware or software? Is this something about ethernet communication? The end result will be to show the user a status indicator for the connection so that you can investigate and fix the bad link.

Are there any metrics that I can extract from TcpClient, Socket, or anything else that tells me about the health of the connection? Perhaps the average time for ack, the number of attempts, etc.

I specifically want to know about the TCP connection, and not just about the ethernet connection in general (your connection to the local network may be a dandy, but there may be a problem with an external server).

Of course, I could ping the remote host, but I do not think that this will really give me the statistics that I am looking for. First, I could ping a router if the server is hiding behind NAT.

+3
source share
2 answers

-, SocketExceptions. , .Net, Java , " " " reset".

, - , catch, , .

TCP- , TCP- , , 10 , , , 30 , , . , , , .

, , . , - . , , RST .

+5

Perfmon - , IP, TCP . , , , , - - , , IO ..

.NET-, , GC, .

, , - TCP .

, , , -.

+1

Source: https://habr.com/ru/post/1698316/


All Articles