I have a port query application that checks a remote port to see if it is open or blocked. What I want to do is when doing the port check, the ability to select which network interface on my local machine to send the traffic out of. Is this possible and how would I do so?
Update:
I have added the following lines and it is still not binding
string localip;
localip = interfacesComboBox.Text;
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
socket.ReceiveTimeout = 1000;
IPAddress myIP = IPAddress.Parse(localip);
socket.Bind(new IPEndPoint(myIP, 0));
That is from my live application so it should roughly work for you.
And an example of where the method is called: