By chance, I came around the IPGlobalProperties
class. Because of interest, I played around a little and tried to make an application that shows the current network activity.
With IPGlobalProperties.GetActiveTcpConnections
I get the current TCP connections. And because also closed connections (TIME_WAIT) are contained within the result of GetActiveTcpConnections
, I thought that this would give me an overview of the whole TCP-communication of the last seconds or minutes.
However there are connections from which I know they exist, but they never appear in the result of GetActiveTcpConnections
.
What am I missing here? How can I get a list, similar to the “Network Activity List” from task-manager?
As an additional information, the requests go to an internal device and the response to this requests always returns correctly. The requests are done by the WebClient-class from the same app. Surprinsinlgy, if I do netstat -ano, they also do not appear. However in Task Managers Resource Monitor, I can see them