计算两个系统之间的最短路径 [英] calculating the shortest path between two systems

查看:62
本文介绍了计算两个系统之间的最短路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我正在从事需要计算最短i e的项目.我需要检查哪台机器靠近我的系统.所以我正在使用套接字.我有一个数组列表,其中列出了所有系统ip地址.所以我需要检查哪个IP靠近我的系统.为此,我随后向每个ip发送一个测试数据包,然后从该ip系统获取答复.直到我得到答复,我才不会将另一个测试数据包发送到其他系统,即我正在同步答复.

所以我的问题是我如何计算发送数据包和接收数据包的时间跨度.此发送n接收以毫秒为单位.那么我该如何计算最短路径.



如果您还有其他选择,请与我分享



来自,
Arun

hello every body

i m working on a project that''s need to calculate the shortest i e . i need to check which machine is near to my system . so foe this i m using sockets. I m having a array list in which all the system ip address are listed . so i need to check which ip is near to my system. For that i m sending a test packet to each ip sequently n get the reply from that ip system . until i get reply i will not send another test packet to other system i.e i m taking synchronous reply.

So my problem is how can i calculate the time span in sending a packet n receiving a packet . this transmitting n receiving gets with in milliseconds . so how can i calculate the shortest path .



If u r having any other option so please share with me



From,
Arun

推荐答案

使用Ping和PingReply. PingReply显示RoundTripTime.
http://msdn.microsoft.com/en-us/library/system.net.networkinformation.pingreply.roundtriptime.aspx [ ^ ]
use Ping and PingReply. The PingReply shows the RoundTripTime.
http://msdn.microsoft.com/en-us/library/system.net.networkinformation.pingreply.roundtriptime.aspx[^]


这篇关于计算两个系统之间的最短路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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