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