다음을 통해 공유


WiFiDirectServiceSession.RemotePortAdded 이벤트

정의

새 원격 포트가 세션에 추가될 때 발생하는 이벤트입니다. 이벤트 처리기는 새 원격 포트에 대한 적절한 소켓 연결을 설정하여 응답해야 합니다.

// Register
event_token RemotePortAdded(TypedEventHandler<WiFiDirectServiceSession, WiFiDirectServiceRemotePortAddedEventArgs const&> const& handler) const;

// Revoke with event_token
void RemotePortAdded(event_token const* cookie) const;

// Revoke with event_revoker
WiFiDirectServiceSession::RemotePortAdded_revoker RemotePortAdded(auto_revoke_t, TypedEventHandler<WiFiDirectServiceSession, WiFiDirectServiceRemotePortAddedEventArgs const&> const& handler) const;
public event TypedEventHandler<WiFiDirectServiceSession,WiFiDirectServiceRemotePortAddedEventArgs> RemotePortAdded;
function onRemotePortAdded(eventArgs) { /* Your code */ }
wiFiDirectServiceSession.addEventListener("remoteportadded", onRemotePortAdded);
wiFiDirectServiceSession.removeEventListener("remoteportadded", onRemotePortAdded);
- or -
wiFiDirectServiceSession.onremoteportadded = onRemotePortAdded;
Public Custom Event RemotePortAdded As TypedEventHandler(Of WiFiDirectServiceSession, WiFiDirectServiceRemotePortAddedEventArgs) 

이벤트 유형

적용 대상