点击或拖拽改变大小

NetworkBaseReceiveMqttFile 方法

使用MQTT协议从网络接收字节数组,然后写入文件或流中,支持进度报告
Use MQTT protocol to receive byte array from the network, and then write it to file or stream, support progress report

命名空间:  HslCommunication.Core.Net
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:10.6.1.0 (10.6.1.0)
语法
protected OperateResult<FileBaseInfo> ReceiveMqttFile(
	Socket socket,
	Object source,
	Action<long, long> reportProgress = null,
	AesCryptography aesCryptography = null
)

参数

socket
类型:System.Net.SocketsSocket
网络套接字
source
类型:SystemObject
文件名或是流
reportProgress (Optional)
类型:SystemActionInt64, Int64
进度报告
aesCryptography (Optional)
类型:HslCommunication.Core.SecurityAesCryptography
AES数据加密对象,如果为空,则不进行加密

返回值

类型:OperateResultFileBaseInfo
是否操作成功,如果成功,携带文件基本信息
参见