OpenDOF Project
int32(* DTLTransportHandler::GetReceiveSize)(DTLTransportHandler handler, const uint8 *buffer, uint32 offset, uint32 length)

Determine the total packet length based on received data in a buffer.

If the length cannot be determined with the data provided, then report the number of additional bytes that must be read before a determination may be made.

This callback must not be NULL.

Parameters
handlerThe TransportHandler that is asking about the size. This must not be NULL.
bufferThe data that comprises the (possibly partial) packet. This may be NULL if length is zero.
offsetThe offset to the first byte of the PDU. This value is ignored if length is zero.
lengthThe amount of data past the offset, which may be zero.
Returns
A negative number to indicate that more data must be read (the absolute value number of additional bytes should be read), or a positive number to indicate the actual (total) length of the PDU, or zero to indicate a catastrophic, unrecoverable error.
core-c-dof-oal Version 8.0.1 Build 0
2018-01-22