WiFiDirectServiceAdvertiser.AutoAcceptSessionConnected 事件

定义

服务自动接受会话请求时引发的事件。 事件处理程序应为事件参数对象中列出的终结点对建立套接字连接。

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

事件类型

适用于