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 中) 版本:12.1.2.0 (12.1.2.0)
语法 protected Task<OperateResult<FileBaseInfo>> ReceiveFileFromSocketAsync(
Socket socket,
string savename,
Action<long, long> receiveReport
)
Protected Function ReceiveFileFromSocketAsync (
socket As Socket,
savename As String,
receiveReport As Action(Of Long, Long)
) As Task(Of OperateResult(Of FileBaseInfo))
protected:
Task<OperateResult<FileBaseInfo^>^>^ ReceiveFileFromSocketAsync(
Socket^ socket,
String^ savename,
Action<long long, long long>^ receiveReport
)
member ReceiveFileFromSocketAsync :
socket : Socket *
savename : string *
receiveReport : Action<int64, int64> -> Task<OperateResult<FileBaseInfo>>
参数
- socket
- 类型:System.Net.SocketsSocket
网络套接字 - savename
- 类型:SystemString
接收文件后保存的文件名 - receiveReport
- 类型:SystemActionInt64, Int64
接收进度报告
返回值
类型:
TaskOperateResultFileBaseInfo包含文件信息的结果对象
参见