你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。

VoiceAgentWebSocketHandlers interface

当连接事件发生时, VoiceAgentWebSocketTransport 调用回调。

属性

onClose

连接关闭时调用。

onError

当传输遇到错误时会被调用。

onMessage

当收到来自服务的消息时调用。

属性详细信息

onClose

连接关闭时调用。

onClose: (code: number, reason: string, wasClean: boolean) => void

属性值

(code: number, reason: string, wasClean: boolean) => void

onError

当传输遇到错误时会被调用。

onError: (error: Error) => void

属性值

(error: Error) => void

onMessage

当收到来自服务的消息时调用。

onMessage: (data: string | ArrayBuffer) => void

属性值

(data: string | ArrayBuffer) => void