Windows Resource Monitor have a nice network filter and its easy to get network statistics of some process (TCP connections, port listen, etc). I tried System.Diagnostics from this , but all examples are about CPU and Memory usage. I found this project, but it looks dirty and unsafe. The only i need is to get Resource Monitor functionality in my c# project to do something like
var process = new Process("ProcessName");
var sockets = process.getSockets();
Is there any safe and legal solution without byte shifting and pointers?