NetworkXBaseSendFileAndCheckReceiveAsync 方法 (Socket, Stream, String, String, String, ActionInt64, Int64) |
[自校验] 将流数据发送至套接字,具体发送细节将在继承类中实现,如果结果异常,则结束通讯
[Self-checking] Send stream data to the socket. The specific sending details will be implemented in the inherited class.
If the result is abnormal, the communication will be terminated
命名空间:
HslCommunication.Core.Net
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.1.0 (12.1.1.0)
语法 protected Task<OperateResult> SendFileAndCheckReceiveAsync(
Socket socket,
Stream stream,
string servername,
string filetag,
string fileupload,
Action<long, long> sendReport = null
)
Protected Function SendFileAndCheckReceiveAsync (
socket As Socket,
stream As Stream,
servername As String,
filetag As String,
fileupload As String,
Optional sendReport As Action(Of Long, Long) = Nothing
) As Task(Of OperateResult)
protected:
Task<OperateResult^>^ SendFileAndCheckReceiveAsync(
Socket^ socket,
Stream^ stream,
String^ servername,
String^ filetag,
String^ fileupload,
Action<long long, long long>^ sendReport = nullptr
)
member SendFileAndCheckReceiveAsync :
socket : Socket *
stream : Stream *
servername : string *
filetag : string *
fileupload : string *
?sendReport : Action<int64, int64>
(* Defaults:
let _sendReport = defaultArg sendReport null
*)
-> Task<OperateResult>
参数
- socket
- 类型:System.Net.SocketsSocket
套接字 - stream
- 类型:System.IOStream
文件名称,文件必须存在 - servername
- 类型:SystemString
远程端的文件名称 - filetag
- 类型:SystemString
文件的额外标签 - fileupload
- 类型:SystemString
文件的上传人 - sendReport (Optional)
- 类型:SystemActionInt64, Int64
发送进度报告
返回值
类型:
TaskOperateResult是否成功的结果对象
参见