NetworkDiagnostics interface

网络诊断

方法

getLatest()

获取最新的已知网络诊断

off("diagnosticChanged", (args: NetworkDiagnosticChangedEventArgs) => void)

取消订阅 diagnosticChanged 事件的函数

on("diagnosticChanged", (args: NetworkDiagnosticChangedEventArgs) => void)

diagnosticChanged 事件的 Subscribe 函数

方法详细信息

getLatest()

获取最新的已知网络诊断

function getLatest(): LatestNetworkDiagnostics

返回

off("diagnosticChanged", (args: NetworkDiagnosticChangedEventArgs) => void)

取消订阅 diagnosticChanged 事件的函数

function off(event: "diagnosticChanged", listener: (args: NetworkDiagnosticChangedEventArgs) => void)

参数

event

"diagnosticChanged"

事件名称

listener

(args: NetworkDiagnosticChangedEventArgs) => void

用于取消订阅此事件的回调 fn

on("diagnosticChanged", (args: NetworkDiagnosticChangedEventArgs) => void)

diagnosticChanged 事件的 Subscribe 函数

function on(event: "diagnosticChanged", listener: (args: NetworkDiagnosticChangedEventArgs) => void)

参数

event

"diagnosticChanged"

事件名称

listener

(args: NetworkDiagnosticChangedEventArgs) => void

在诊断发生更改时将调用的回调 fn