0
votes

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"

I can see a SYN_SENT message.

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.

2

2 Answers

0
votes

You can not. This is the first time this even came up. A loopback adapter is not connected to any network. You basically ask why 2 telephones not connected to a phone network by any means can not call each other.

You want communication - why the heck do you even use 2 loopback adapters? This also is the first time I hear of that. You can assign multiple IP addresses to one.

0
votes

I think your question needs to be more clear and in detail.

For now, I can only think of window firewall. Did you turn off the software firewall and try?