IcmpV4Statistics.EchoRequestsReceived Egenskap

Definition

Hämtar antalet meddelanden om Internet Control Message Protocol version 4 (ICMPv4) Echo Request som togs emot.

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

Egenskapsvärde

Ett Int64 värde som anger det totala antalet ICMP Echo Request-meddelanden som togs emot.

Exempel

I följande exempel visas värdet för den här egenskapen.

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

Kommentarer

Ekobegäran och Ekosvarsmeddelanden gör att en dator kan begära ett ICMP-svar från en fjärrdator i ett nätverk. Den här funktionen används ofta för att fastställa giltigheten för fjärradresser.

Gäller för