MqttServerPublishTopicPayload 方法 (String, String, Byte, Boolean) |
向指定的客户端ID强制发送消息,默认消息不驻留
Forces a message to the specified client ID, and the default message does not retain
命名空间:
HslCommunication.MQTT
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public void PublishTopicPayload(
string clientId,
string topic,
byte[] payload,
bool retain = false
)
Public Sub PublishTopicPayload (
clientId As String,
topic As String,
payload As Byte(),
Optional retain As Boolean = false
)
public:
void PublishTopicPayload(
String^ clientId,
String^ topic,
array<unsigned char>^ payload,
bool retain = false
)
member PublishTopicPayload :
clientId : string *
topic : string *
payload : byte[] *
?retain : bool
(* Defaults:
let _retain = defaultArg retain false
*)
-> unit
参数
- clientId
- 类型:SystemString
指定的客户端ID信息 - topic
- 类型:SystemString
主题 - payload
- 类型:SystemByte
消息内容 - retain (Optional)
- 类型:SystemBoolean
指示消息是否驻留
参见