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.
Deprecated. 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;
/// [add: Windows.Foundation.Metadata.Deprecated("IWiFiDirectServiceSession is deprecated and might not work on all platforms. For more info, see Microsoft Learn.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 1245184, "Windows.Foundation.UniversalApiContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("IWiFiDirectServiceSession is deprecated and might not work on all platforms. For more info, see Microsoft Learn.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 1245184, "Windows.Foundation.UniversalApiContract")]
// 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;
[add: Windows.Foundation.Metadata.Deprecated("IWiFiDirectServiceSession is deprecated and might not work on all platforms. For more info, see Microsoft Learn.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 1245184, "Windows.Foundation.UniversalApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("IWiFiDirectServiceSession is deprecated and might not work on all platforms. For more info, see Microsoft Learn.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 1245184, "Windows.Foundation.UniversalApiContract")]
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)
Event Type
- Attributes