NetworkBaseReceiveAndCheckBytes 方法 |
[自校验] 接收一条完整的同步数据,包含头子节和内容字节,基础的数据,如果结果异常,则结束通讯
[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 OperateResult<byte[], byte[]> ReceiveAndCheckBytes(
Socket socket,
int timeOut
)
Protected Function ReceiveAndCheckBytes (
socket As Socket,
timeOut As Integer
) As OperateResult(Of Byte(), Byte())
protected:
OperateResult<array<unsigned char>^, array<unsigned char>^>^ ReceiveAndCheckBytes(
Socket^ socket,
int timeOut
)
member ReceiveAndCheckBytes :
socket : Socket *
timeOut : int -> OperateResult<byte[], byte[]>
参数
- socket
- 类型:System.Net.SocketsSocket
套接字 - timeOut
- 类型:SystemInt32
超时时间设置,如果为负数,则不检查超时
返回值
类型:
OperateResultByte,
Byte包含是否成功的结果对象
异常 异常 | 条件 |
---|
ArgumentNullException | result |
参见