Partager via


WiFiDirectServiceAdvertiser.SessionRequested Événement

Définition

Événement déclenché lorsqu’un chercheur a demandé qu’une session soit établie avec le service associé à cette instance WiFiDirectServiceAdvertiser. Pour accepter la demande, appelez WiFiDirectServiceAdvertiser.ConnectAsync dans votre gestionnaire d’événements.

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

Type d'événement

S’applique à