WiFiDirectServiceAdvertiser.SessionRequested 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 Seeker has requested that a session be established with the service associated with this WiFiDirectServiceAdvertiser instance. To accept the request, call WiFiDirectServiceAdvertiser.ConnectAsync in your event handler.
// Register
event_token SessionRequested(TypedEventHandler<WiFiDirectServiceAdvertiser, WiFiDirectServiceSessionRequestedEventArgs const&> const& handler) const;
// Revoke with event_token
void SessionRequested(event_token const* cookie) const;
// Revoke with event_revoker
WiFiDirectServiceAdvertiser::SessionRequested_revoker SessionRequested(auto_revoke_t, TypedEventHandler<WiFiDirectServiceAdvertiser, WiFiDirectServiceSessionRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<WiFiDirectServiceAdvertiser,WiFiDirectServiceSessionRequestedEventArgs> SessionRequested;
function onSessionRequested(eventArgs) { /* Your code */ }
wiFiDirectServiceAdvertiser.addEventListener("sessionrequested", onSessionRequested);
wiFiDirectServiceAdvertiser.removeEventListener("sessionrequested", onSessionRequested);
- or -
wiFiDirectServiceAdvertiser.onsessionrequested = onSessionRequested;
Public Custom Event SessionRequested As TypedEventHandler(Of WiFiDirectServiceAdvertiser, WiFiDirectServiceSessionRequestedEventArgs)