Determine the length of the packet to in a buffer.
Namespace: org.opendof.core.transport
Assembly: dof-oal (in dof-oal.dll) Version: 7.0.1.2
Syntax
C#
int getReceiveSize( byte[] buffer, int offset, int length )
Parameters
- buffer
- Type: SystemByte
The data that comprises the (possibly partial) packet. Null may be be passed only if length is zero. - offset
- Type: SystemInt32
The offset of the first byte of the PDU, which must be greater than or equal to zero. This value is ignored if length is zero. - length
- Type: SystemInt32
The amount of data currently present past the offset, which may be zero.
Return Value
Type: Int32A negative number to indicate that more data must be read (the absolute value of the return indicates the number of additional bytes that be read), a positive number to indicate the actual length of the PDU, or zero to indicate a catastrophic, unrecoverable error.
Remarks
See Also