我一直在寻找关于 C# PingReply 中返回的往返时间是多个结果的平均值还是一个结果的平均值的文档,但我似乎找不到答案。有谁知道这一点,或者有人可以在文档中找到我错过的内容吗?
最佳答案
这是您得到的往返时间。您可以引用MSDN :
The Ping class attempts to send an Internet Control Message Protocol (ICMP) echo request to a remote computer and receive information back from the computer via an ICMP echo reply message. The Ping class uses instances of the PingReply class to return information about the operation, such as its status and the time taken to send the request and receive the reply.
The Send methods return instances of the PingReply class directly. The SendAsync methods return a PingReply in the PingCompletedEventHandler method's PingCompletedEventArgs parameter. The PingReply is accessed through the Reply property.
关于c# - C# Ping(或 PingReply)是否采用平均 RTT?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32840333/