共用方式為


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) 

事件類型

適用於