IcmpV4Statistics.EchoRequestsSent Egenskap

Definition

Hämtar antalet Meddelanden i Internet Control Message Protocol version 4 (ICMPv4) Ekobegäran som skickades.

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

Egenskapsvärde

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

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