I have a server listening for connections on UDP and another on TCP. I need to know what process initiated the connection. Is that possible? I have found multiple solutions, but all imply checking each process for each port, which has a performance issue in my view. Also, when i tried this, i only get the PID of my server application, not the client.
Thank you
you can try this
You will get the exact output of the process
Try this for complete process id port and process name.
netstat -abno
you can collect the information and then the parse the output
this one stack link might be helping you. Which PID listens on a given port in c#