MqttHelperBuildConnectMqttCommand 方法 |
创建MQTT连接服务器的报文信息
Create MQTT connection server message information
命名空间:
HslCommunication.MQTT
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public static OperateResult<byte[]> BuildConnectMqttCommand(
MqttConnectionOptions connectionOptions,
string protocol = "MQTT",
RSACryptoServiceProvider rsa = null
)
Public Shared Function BuildConnectMqttCommand (
connectionOptions As MqttConnectionOptions,
Optional protocol As String = "MQTT",
Optional rsa As RSACryptoServiceProvider = Nothing
) As OperateResult(Of Byte())
public:
static OperateResult<array<unsigned char>^>^ BuildConnectMqttCommand(
MqttConnectionOptions^ connectionOptions,
String^ protocol = L"MQTT",
RSACryptoServiceProvider^ rsa = nullptr
)
static member BuildConnectMqttCommand :
connectionOptions : MqttConnectionOptions *
?protocol : string *
?rsa : RSACryptoServiceProvider
(* Defaults:
let _protocol = defaultArg protocol "MQTT"
let _rsa = defaultArg rsa null
*)
-> OperateResult<byte[]>
参数
- connectionOptions
- 类型:HslCommunication.MQTTMqttConnectionOptions
连接配置 - protocol (Optional)
- 类型:SystemString
协议的内容 - rsa (Optional)
- 类型:System.Security.CryptographyRSACryptoServiceProvider
数据加密对象
返回值
类型:
OperateResultByte返回是否成功的信息
参见