| NetworkBaseReceiveMqttStream 方法  | 
 
            使用MQTT协议从socket接收指定长度的字节数组,然后全部写入到流中,可以指定进度报告
            Use the MQTT protocol to receive a byte array of specified length from the socket, and then write all of them to the stream, and you can specify a progress report
            
 
        命名空间: 
     HslCommunication.Core.Net
        程序集:
     HslCommunication (在 HslCommunication.dll 中) 版本:10.1.4.0 (10.1.4.0)
 语法
语法protected OperateResult ReceiveMqttStream(
	Socket socket,
	Stream stream,
	long fileSize,
	int timeOut,
	Action<long, long> reportProgress = null
)
Protected Function ReceiveMqttStream ( 
	socket As Socket,
	stream As Stream,
	fileSize As Long,
	timeOut As Integer,
	Optional reportProgress As Action(Of Long, Long) = Nothing
) As OperateResult
protected:
OperateResult^ ReceiveMqttStream(
	Socket^ socket, 
	Stream^ stream, 
	long long fileSize, 
	int timeOut, 
	Action<long long, long long>^ reportProgress = nullptr
)
member ReceiveMqttStream : 
        socket : Socket * 
        stream : Stream * 
        fileSize : int64 * 
        timeOut : int * 
        ?reportProgress : Action<int64, int64> 
(* Defaults:
        let _reportProgress = defaultArg reportProgress null
*)
-> OperateResult 
参数
- socket
- 类型:System.Net.SocketsSocket
 网络套接字
- stream
- 类型:System.IOStream
 数据流
- fileSize
- 类型:SystemInt64
 数据大小
- timeOut
- 类型:SystemInt32
 超时时间
- reportProgress (Optional)
- 类型:SystemActionInt64, Int64
 进度报告,第一个参数是已完成的字节数量,第二个参数是总字节数量。
返回值
类型:
OperateResult是否操作成功
 参见
参见