NetworkXBaseReceiveFileFromSocket 方法 (Socket, Stream, 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,
Stream stream,
Action<long, long> receiveReport
)
Protected Function ReceiveFileFromSocket (
socket As Socket,
stream As Stream,
receiveReport As Action(Of Long, Long)
) As OperateResult(Of FileBaseInfo)
protected:
OperateResult<FileBaseInfo^>^ ReceiveFileFromSocket(
Socket^ socket,
Stream^ stream,
Action<long long, long long>^ receiveReport
)
member ReceiveFileFromSocket :
socket : Socket *
stream : Stream *
receiveReport : Action<int64, int64> -> OperateResult<FileBaseInfo>
参数
- socket
- 类型:System.Net.SocketsSocket
网络套接字 - stream
- 类型:System.IOStream
等待写入的数据流 - receiveReport
- 类型:SystemActionInt64, Int64
接收进度报告
返回值
类型:
OperateResultFileBaseInfo文件头结果
参见