NetworkBaseReceiveStringContentFromSocketAsync 方法 |
[自校验] 从网络中接收一个字符串数据,如果结果异常,则结束通讯
[Self-checking] Receive a string of data 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<int, string>> ReceiveStringContentFromSocketAsync(
Socket socket,
int timeOut = 30000
)
Protected Function ReceiveStringContentFromSocketAsync (
socket As Socket,
Optional timeOut As Integer = 30000
) As Task(Of OperateResult(Of Integer, String))
protected:
Task<OperateResult<int, String^>^>^ ReceiveStringContentFromSocketAsync(
Socket^ socket,
int timeOut = 30000
)
member ReceiveStringContentFromSocketAsync :
socket : Socket *
?timeOut : int
(* Defaults:
let _timeOut = defaultArg timeOut 30000
*)
-> Task<OperateResult<int, string>>
参数
- socket
- 类型:System.Net.SocketsSocket
套接字 - timeOut (Optional)
- 类型:SystemInt32
接收数据的超时时间
返回值
类型:
TaskOperateResultInt32,
String包含是否成功的结果对象
参见