Ping.PingCompleted 이벤트

정의

ICMP(Internet Control Message Protocol) Echo 메시지를 보내고 이에 대응하는 ICMP Echo Reply 메시지를 받기 위한 비동기 작업이 완료되거나 취소될 때 발생합니다.

public:
 event System::Net::NetworkInformation::PingCompletedEventHandler ^ PingCompleted;
public event System.Net.NetworkInformation.PingCompletedEventHandler? PingCompleted;
public event System.Net.NetworkInformation.PingCompletedEventHandler PingCompleted;
member this.PingCompleted : System.Net.NetworkInformation.PingCompletedEventHandler 
Public Custom Event PingCompleted As PingCompletedEventHandler 
Public Event PingCompleted As PingCompletedEventHandler 

이벤트 유형

예제

다음 코드 예제에서는 이벤트에 대 한 콜백 메서드를 지정 하는 방법을 보여 줍니다 PingCompleted . 전체 예제는 클래스 개요에서 Ping 사용할 수 있습니다.

Ping ^ pingSender = gcnew Ping;

// When the PingCompleted event is raised,
// the PingCompletedCallback method is called.
pingSender->PingCompleted += gcnew PingCompletedEventHandler( PingCompletedCallback );
Ping pingSender = new Ping ();

// When the PingCompleted event is raised,
// the PingCompletedCallback method is called.
pingSender.PingCompleted += new PingCompletedEventHandler (PingCompletedCallback);

설명

애플리케이션을 사용 합니다 PingCompleted 중 하나를 호출 하 여 완료 상태 및 데이터에 대 한 정보를 보려면 이벤트를 수집 합니다 SendAsync 메서드. 대리자는 PingCompletedEventHandler 이 이벤트를 발생할 때 SendAsync 호출되는 콜백 메서드를 제공합니다.

적용 대상