WiFiDirectServiceSession.RemotePortAdded Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Event raised when a new remote port is added to the session. Your event handler should respond by establishing the appropriate socket connection to the new remote port.
// 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)