有可能失去本地主机网络连接吗?
一旦在同一台计算机上运行的两个应用程序之间建立了 Tcp/Ip 连接,使用本地主机环回是否真的有可能丢失该连接?或者是否可以假设这种连接丢失与蓝屏事件一样罕见,并以非常特殊的方式对待它。
当然,假设应用程序都没有自愿终止连接,也没有人故意干扰连接。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这确实是一个例外情况,当然,对机器进行简单的 DoS 攻击可能会增加可能性。
当像这样的本地到本地连接丢失时,可能会出现其他一些迫在眉睫的危机(例如内存不足、网络配置发生变化):这可能是出现更大问题的征兆。
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.
它很可能永远有效。
环回是操作系统的一部分,就像 COM 框架、shell-API 或任务调度程序一样。当然,事情可能会出错。 RPC 服务和虚拟适配器驱动程序都可能崩溃,让您陷入困境。但这很可能是由于其他领域的严重问题(内存不足、环境变化、硬件故障等)造成的。
您需要能够依赖某些东西。
〜罗布
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
是的,
这是可能的。我看到在某些情况下(lmhosts 或主机)文件被更改,因此 localhost 条目被更改为其他地址。
如果某些应用程序尝试访问本地主机,它实际上会被重定向到另一个地址,因此将无法创建或维护连接。
编辑:
正如 bmargulies 所提到的,现有的连接不会被关闭,但新的连接将会出现我上面显示的问题。
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.