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)