NetworkBaseReceiveAndCheckBytesAsync 方法 |
[自校验] 接收一条完整的同步数据,包含头子节和内容字节,基础的数据,如果结果异常,则结束通讯
[Self-checking] Receive a complete synchronization data, including header subsection and content bytes, basic data, 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<byte[], byte[]>> ReceiveAndCheckBytesAsync(
Socket socket,
int timeout
)
Protected Function ReceiveAndCheckBytesAsync (
socket As Socket,
timeout As Integer
) As Task(Of OperateResult(Of Byte(), Byte()))
protected:
Task<OperateResult<array<unsigned char>^, array<unsigned char>^>^>^ ReceiveAndCheckBytesAsync(
Socket^ socket,
int timeout
)
member ReceiveAndCheckBytesAsync :
socket : Socket *
timeout : int -> Task<OperateResult<byte[], byte[]>>
参数
- socket
- 类型:System.Net.SocketsSocket
套接字 - timeout
- 类型:SystemInt32
[缺少 "M:HslCommunication.Core.Net.NetworkBase.ReceiveAndCheckBytesAsync(System.Net.Sockets.Socket,System.Int32)" 的 <param name="timeout"/> 文档]
返回值
类型:
TaskOperateResultByte,
Byte包含是否成功的结果对象
异常 异常 | 条件 |
---|
ArgumentNullException | result |
参见