你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
ConnectionMessage class
ConnectionMessage 表示发送到语音服务以及从语音服务接收的特定于实现的消息。 这些消息用于调试目的,不应用于 Azure 认知服务语音服务的生产用例。 发送到语音服务以及从语音服务接收的消息如有更改,恕不另行通知。 这包括消息内容、标头、有效负载、排序等。在版本 1.11.0 中添加。
属性
binary |
获取二进制消息有效负载。 |
is |
检查 ConnectionMessage 是否为二进制消息。 另请参阅 GetBinaryMessage () 。 |
is |
检查 ConnectionMessage 是否为短信。 另请参阅 IsBinaryMessage () 。 |
path | 消息路径。 |
properties | 为此 定义的属性及其值的集合。 可以通过此集合 (访问邮件头,例如“Content-Type”) 。 |
Text |
获取文本消息有效负载。 通常,文本消息内容类型为 application/json。 若要确定其他内容类型,请使用 Properties.GetProperty (“Content-Type”) 。 |
方法
to |
返回表示连接消息的字符串。 |
属性详细信息
binaryMessage
获取二进制消息有效负载。
ArrayBuffer binaryMessage
属性值
ArrayBuffer
isBinaryMessage
检查 ConnectionMessage 是否为二进制消息。 另请参阅 GetBinaryMessage () 。
boolean isBinaryMessage
属性值
boolean
isTextMessage
检查 ConnectionMessage 是否为短信。 另请参阅 IsBinaryMessage () 。
boolean isTextMessage
属性值
boolean
path
消息路径。
string path
属性值
string
properties
为此 定义的属性及其值的集合。 可以通过此集合 (访问邮件头,例如“Content-Type”) 。
PropertyCollection properties
属性值
TextMessage
获取文本消息有效负载。 通常,文本消息内容类型为 application/json。 若要确定其他内容类型,请使用 Properties.GetProperty (“Content-Type”) 。
string TextMessage
属性值
string
方法详细信息
toString()
返回表示连接消息的字符串。
function toString(): string
返回
string