ResponseUserProperties 属性
获取或设置 PUBREC 用户属性。读/写。变量。
语法
msgEvent
.ResponseUserProperties
其中
msgEvent
- 是 MQTTMessageEvent 参数对象。
小贴士:
此属性的数据类型为 Variant,但是,只能为其分配 MQTTUserProperty 对象的数组。
示例
Dim userPropsText As String Dim userProps() As MQTTUserProperty If VarType(msgEvent.Message.UserProperties) <> Empty Then userProps = msgEvent.Message.UserProperties For i = LBound(userProps) To UBound(userProps) userPropsText = userPropsText + userProps(i).Name + ":" + userProps(i).Value + " " Next End If
提供反馈