Condividi tramite


WiFiDirectServiceAdvertiser.SessionRequested Evento

Definizione

Evento generato quando un richiedente ha richiesto che una sessione venga stabilita con il servizio associato a questa istanza di WiFiDirectServiceAdvertiser. Per accettare la richiesta, chiamare WiFiDirectServiceAdvertiser.ConnectAsync nel gestore eventi.

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

Tipo evento

Si applica a