09-16-2013 07:09 AM
If working on a local machine, the OS should not transmit the data using the actual network device. It will, of course, use the TCP-stack, but it will not send the data.
So it does not matter if a cable is connected or not.
This is definetly true if using the IP address of 127.0.0.1 (aka "localhost"). Depending on the OS and network setup, using the actual IP of the PC (e.g. 168.192.0.123), the OS might use loop back by the network device itself or stick to only use the internal TCP stack.
Another reason for "unexpected" working connection might be that the PC automatically uses a wireless connection once you remove the network cable physically.
A last hint i want to give you:
Using the localhost for testing network communication does not show if the application will work properly once you use different systems for the components. Most obvious reason being firewall and virus scan software settings.
hope this helps,
Norbert