点击或拖拽改变大小

NetworkXBaseReceiveFileFromSocketAsync 方法 (Socket, String, ActionInt64, Int64)

[自校验] 从网络中接收一个文件,如果结果异常,则结束通讯
[Self-checking] Receive a file from the network. If the result is abnormal, the communication ends.

命名空间:  HslCommunication.Core.Net
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
protected Task<OperateResult<FileBaseInfo>> ReceiveFileFromSocketAsync(
	Socket socket,
	string savename,
	Action<long, long> receiveReport
)

参数

socket
类型:System.Net.SocketsSocket
网络套接字
savename
类型:SystemString
接收文件后保存的文件名
receiveReport
类型:SystemActionInt64, Int64
接收进度报告

返回值

类型:TaskOperateResultFileBaseInfo
包含文件信息的结果对象
参见