WiFiDirectServiceAdvertiser.SessionRequested 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当 Seeker 请求与此 WiFiDirectServiceAdvertiser 实例关联的服务建立会话时引发的事件。 若要接受请求,请在事件处理程序中调用 WiFiDirectServiceAdvertiser.ConnectAsync 。
// 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)