共用方式為


GattSession.SessionStatusChanged 事件

定義

GATT 會話狀態變更時所觸發的事件。

// Register
event_token SessionStatusChanged(TypedEventHandler<GattSession, GattSessionStatusChangedEventArgs const&> const& handler) const;

// Revoke with event_token
void SessionStatusChanged(event_token const* cookie) const;

// Revoke with event_revoker
GattSession::SessionStatusChanged_revoker SessionStatusChanged(auto_revoke_t, TypedEventHandler<GattSession, GattSessionStatusChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<GattSession,GattSessionStatusChangedEventArgs> SessionStatusChanged;
function onSessionStatusChanged(eventArgs) { /* Your code */ }
gattSession.addEventListener("sessionstatuschanged", onSessionStatusChanged);
gattSession.removeEventListener("sessionstatuschanged", onSessionStatusChanged);
- or -
gattSession.onsessionstatuschanged = onSessionStatusChanged;
Public Custom Event SessionStatusChanged As TypedEventHandler(Of GattSession, GattSessionStatusChangedEventArgs) 

事件類型

Windows 需求

應用程式功能
bluetooth

適用於