Freigeben über


WiFiDirectServiceSession.RemotePortAdded Ereignis

Definition

Das Ereignis wird ausgelöst, wenn der Sitzung ein neuer Remoteport hinzugefügt wird. Ihr Ereignishandler sollte reagieren, indem er die entsprechende Socketverbindung mit dem neuen Remoteport herstellt.

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

Ereignistyp

Gilt für: