如何在 tcp 连接中使用 LoopBack [英] How to use LoopBack in tcp connection

查看:28
本文介绍了如何在 tcp 连接中使用 LoopBack的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的申请对时间要求非常严格.它通过 TCP/IP 与另一个应用程序通信.这两个应用程序都在同一台机器上运行.我的应用程序是用 vb.net 编写的,当然我有源代码.我通过套接字与该外部应用程序通信.每当我向该应用程序发送消息时,它都会花费正常时间,因为它在同一网络上的其他计算机上运行.我想通过绕过开关来减少时间.类似于 LOOPBACK 的东西.谁能帮忙

My application is very time critical. It communicates with another application thru TCP/IP. Both the applications are running on the same machine. My application is written in vb.net and of Course I have got the source. I communicate to that foreign application thru a socket. Whenever I send a message to that application it takes the normal time as it is running on some other computer on the same network. I want to reduce the time by bypassing the switch. Something like LOOPBACK. Can any one help

推荐答案

如果您使用 127.0.0.1 地址而不是机器的正常"IP 地址,则应使用环回适配器.如果真的在网络级别花费与单独的机器相同的时间,我会感到惊讶 - 您确定您正在测量网络交付时间而不是(比如说)应用响应时间?

If you use an address of 127.0.0.1 instead of the "normal" IP address of the machine, that should use the loopback adapter. I'd be surprised if it really took the same amount of time as a separate machine at the network level though - are you sure you're measuring network delivery time rather than (say) application response time?

这篇关于如何在 tcp 连接中使用 LoopBack的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆