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