WiFiDirectServiceAdvertiser.AutoAcceptSessionConnected 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
服务自动接受会话请求时引发的事件。 事件处理程序应为事件参数对象中列出的终结点对建立套接字连接。
// Register
event_token AutoAcceptSessionConnected(TypedEventHandler<WiFiDirectServiceAdvertiser, WiFiDirectServiceAutoAcceptSessionConnectedEventArgs const&> const& handler) const;
// Revoke with event_token
void AutoAcceptSessionConnected(event_token const* cookie) const;
// Revoke with event_revoker
WiFiDirectServiceAdvertiser::AutoAcceptSessionConnected_revoker AutoAcceptSessionConnected(auto_revoke_t, TypedEventHandler<WiFiDirectServiceAdvertiser, WiFiDirectServiceAutoAcceptSessionConnectedEventArgs const&> const& handler) const;
public event TypedEventHandler<WiFiDirectServiceAdvertiser,WiFiDirectServiceAutoAcceptSessionConnectedEventArgs> AutoAcceptSessionConnected;
function onAutoAcceptSessionConnected(eventArgs) { /* Your code */ }
wiFiDirectServiceAdvertiser.addEventListener("autoacceptsessionconnected", onAutoAcceptSessionConnected);
wiFiDirectServiceAdvertiser.removeEventListener("autoacceptsessionconnected", onAutoAcceptSessionConnected);
- or -
wiFiDirectServiceAdvertiser.onautoacceptsessionconnected = onAutoAcceptSessionConnected;
Public Custom Event AutoAcceptSessionConnected As TypedEventHandler(Of WiFiDirectServiceAdvertiser, WiFiDirectServiceAutoAcceptSessionConnectedEventArgs)