Title: How can I filter GetActiveTcpConnections to only include those for a particular image name?
Tags: c#
Question: How I get all tcp connections from a specific app?
I have all connections, it is ok but I need to determine process Id or appName or Image (is named on Windows resource monitoring network tab).
Currently I have this:
var properties = IPGlobalProperties.GetIPGlobalProperties();
var connections = properties.GetActiveTcpConnections().Where(I need here).ToList();
But I'm not sure what to use in the Where() linq statement?
Comment: Possible duplicate of [Which PID listens on a given port in c#](https://stackoverflow.com/questions/577433/which-pid-listens-on-a-given-port-in-c-sharp)

Comment: See following posting : https://stackoverflow.com/questions/577433/which-pid-listens-on-a-given-port-in-c-sharp



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2018:00:01/22/18', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<c#>', 'Title': 'How can I filter GetActiveTcpConnections to only include those for a particular image name?', 'ViewCount': 334, 'id': 48380995, 'user_AboutMe': '<p>#StartAgain</p>\n', 'user_AccountId': 6692989.0, 'user_DisplayName': 'is_oz', 'user_Reputation': 693.0, 'user_Views': 85.0, 'user_id': 5161912.0}}