Question

Once a Tcp/Ip connection has been established between two applications running on the same computer, using the localhost loop back is there any real possibility of losing that connection? Or is it possible to make the assumption that such a connection loss is as rare as a blue screen event, and treat it in a very exceptional manner.

Assuming of course that neither application voluntarily terminates the connection, nor that someone intentionally interfere with the connection.

Was it helpful?

Solution

It would be an exceptional case indeed, of course a simple DoS attack on the machine could increase the likelyhood.

When a local-local connection like this is lost, there is probably some other looming crisis around the corner (e.g. low memory, change in networking configuration): this might be a symptom of a bigger problem arising.

OTHER TIPS

It'll most likely always work.

The loopback is part of your OS, just as the COM framework is too, or the shell-API, or the task scheduler. Of course things can go wrong. The RPC service can crash and the virtual adapter driver as well, leaving you stranded. But that is most likely due to serious issues in other fields (low memory, environment changes, hardware failures an such).

You need to be able to depend on something.

~Rob

Yeap,

it's possible. I saw some cases in which the (lmhosts or hosts) file is altered so the localhost entry is altered to some other address.

If some application try to access localhost, it will actually be redirected to another address and, as a consequence, will not be able to create or maintain a connection.

EDIT: as mentioned by bmargulies, existing connections will not be closed, but new ones will have the problem I showed above.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top