I am planning on building a program that detects another process tcp/udp connections when they get established. I imagine it contains some sort of loop untill the certain connection has found, and then a secound loop to check if connection is lost.
I check if it was detectable with a program named "TCPView" and found out that the process im after making a connection when I need an event to be called, so thought I should be able to do so with C#.
My question: How do i detect such a thing in C#?