NetworkXBaseSendFileAndCheckReceive 方法 (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 中) 版本:12.1.2.0 (12.1.2.0)
语法 protected OperateResult SendFileAndCheckReceive(
Socket socket,
string filename,
string servername,
string filetag,
string fileupload,
Action<long, long> sendReport = null
)
Protected Function SendFileAndCheckReceive (
socket As Socket,
filename As String,
servername As String,
filetag As String,
fileupload As String,
Optional sendReport As Action(Of Long, Long) = Nothing
) As OperateResult
protected:
OperateResult^ SendFileAndCheckReceive(
Socket^ socket,
String^ filename,
String^ servername,
String^ filetag,
String^ fileupload,
Action<long long, long long>^ sendReport = nullptr
)
member SendFileAndCheckReceive :
socket : Socket *
filename : string *
servername : string *
filetag : string *
fileupload : string *
?sendReport : Action<int64, int64>
(* Defaults:
let _sendReport = defaultArg sendReport null
*)
-> OperateResult
参数
- socket
- 类型:System.Net.SocketsSocket
套接字 - filename
- 类型:SystemString
文件名称,文件必须存在 - servername
- 类型:SystemString
远程端的文件名称 - filetag
- 类型:SystemString
文件的额外标签 - fileupload
- 类型:SystemString
文件的上传人 - sendReport (Optional)
- 类型:SystemActionInt64, Int64
发送进度报告
返回值
类型:
OperateResult是否发送成功
参见