NetworkXBaseSendFileStreamToSocket 方法 |
[自校验] 将文件数据发送至套接字,如果结果异常,则结束通讯
[Self-check] Send the file data to the socket. If the result is abnormal, the communication is ended.
命名空间:
HslCommunication.Core.Net
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 protected OperateResult SendFileStreamToSocket(
Socket socket,
string filename,
long filelength,
Action<long, long> report = null
)
Protected Function SendFileStreamToSocket (
socket As Socket,
filename As String,
filelength As Long,
Optional report As Action(Of Long, Long) = Nothing
) As OperateResult
protected:
OperateResult^ SendFileStreamToSocket(
Socket^ socket,
String^ filename,
long long filelength,
Action<long long, long long>^ report = nullptr
)
member SendFileStreamToSocket :
socket : Socket *
filename : string *
filelength : int64 *
?report : Action<int64, int64>
(* Defaults:
let _report = defaultArg report null
*)
-> OperateResult
参数
- socket
- 类型:System.Net.SocketsSocket
网络套接字 - filename
- 类型:SystemString
完整的文件路径 - filelength
- 类型:SystemInt64
文件的长度 - report (Optional)
- 类型:SystemActionInt64, Int64
进度报告器
返回值
类型:
OperateResult是否发送成功
参见