I've two Microsoft Loopback adapters installed, with IP address "10.10.10.10" and "10.10.10.11" respectively. I've socket listening on "10.10.10.11" Port 7000. I create another socket and, first, bind it to "10.10.10.10" Port 7099, whic is the second loopback adapter, and then try to connect to the server. The server refuses the connection with the following message:
"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 10.10.10.11:7000"
Can anyone tell me why is this error and how can I communicate between two loopback adapters?
Let me share some code. The server & client are two different applications. The server code is a simple case of creating a socket, binding to "10.10.10.11" Port=7000, and calling Listen() method, and then calling BeginAccept.
On the client side, here is the code:
m_clientSocket = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp );
// Create the end points
IPEndPoint ipRemoteEP = new IPEndPoint (IPAddress.Parse("10.10.10.11"),7000); //Represent Loopback adapter 1
IPEndPoint ipLocalEP = new IPEndPoint((IPAddress.Parse("10.10.10.10"),7099); //Represent Loopback adapter 2
//First Bind to local EP then Connect to the remote EP
m_clientSocket.Bind(ipLocalEP);
m_clientSocket.Connect ( ipRemoteEP);
It doesn't connect and gives me the above mentioned error.
