Udostępnij za pośrednictwem


IcmpV4Statistics.EchoRepliesReceived Właściwość

Definicja

Pobiera liczbę odebranych komunikatów odpowiedzi echo protokołu ICMPv4 (Internet Control Message Protocol w wersji 4).

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

Wartość właściwości

Wartość Int64 określająca całkowitą liczbę odebranych komunikatów odpowiedzi echa ICMP.

Przykłady

W poniższym przykładzie jest wyświetlana wartość tej właściwości.

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 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

Uwagi

Komunikaty żądania echa i odpowiedzi echa umożliwiają komputerowi żądanie odpowiedzi ICMP z komputera zdalnego w sieci. Ta funkcja jest często używana do określania ważności adresów zdalnych.

Dotyczy