点击或拖拽改变大小

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

[自校验] 将文件数据发送至套接字,具体发送细节将在继承类中实现,如果结果异常,则结束通讯
[Self-checking] Send the file data to the socket. The specific sending details will be implemented in the inherited class. If the result is abnormal, the communication will end

命名空间:  HslCommunication.Core.Net
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
protected Task<OperateResult> SendFileAndCheckReceiveAsync(
	Socket socket,
	string filename,
	string servername,
	string filetag,
	string fileupload,
	Action<long, long> sendReport = null
)

参数

socket
类型:System.Net.SocketsSocket
套接字
filename
类型:SystemString
文件名称,文件必须存在
servername
类型:SystemString
远程端的文件名称
filetag
类型:SystemString
文件的额外标签
fileupload
类型:SystemString
文件的上传人
sendReport (Optional)
类型:SystemActionInt64, Int64
发送进度报告

返回值

类型:TaskOperateResult
是否发送成功
参见