語言

IcmpV4Statistics.EchoRequestsReceived 屬性

定義

取得收到的網際網路控制訊息協定版本4(ICMPv4)回聲請求訊息數量。

public:
 abstract property long EchoRequestsReceived { long get(); };
public abstract long EchoRequestsReceived { get; }
member this.EchoRequestsReceived : int64
Public MustOverride ReadOnly Property EchoRequestsReceived As Long

屬性值

此 Int64 值指定已接收的 ICMP Echo Request 訊息總數。

範例

以下範例展示了此性質的價值。

public static void ShowIcmpV4EchoData()
{
    IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
    IcmpV4Statistics statistics = properties.GetIcmpV4Statistics();
    Console.WriteLine("  Echo Requests ....................... Sent: {0,-10}   Received: {1,-10}",
        statistics.EchoRequestsSent, statistics.EchoRequestsReceived);
    Console.WriteLine("  Echo Replies ........................ Sent: {0,-10}   Received: {1,-10}",
        statistics.EchoRepliesSent, statistics.EchoRepliesReceived);
}
Public Shared Sub ShowIcmpV4EchoData() 
    Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
    Dim statistics As IcmpV4Statistics = properties.GetIcmpV4Statistics()
    Console.WriteLine("  Echo Requests ....................... Sent: {0,-10}   Received: {1,-10}", statistics.EchoRequestsSent, statistics.EchoRequestsReceived)
    Console.WriteLine("  Echo Replies ........................ Sent: {0,-10}   Received: {1,-10}", statistics.EchoRepliesSent, statistics.EchoRepliesReceived)

End Sub

備註

Echo Request 與 Echo Reply 訊息允許電腦向網路上的遠端電腦請求 ICMP 回應。 此功能常用於判定遠端位址的有效性。

適用於