OpenDOF Project
boolean(* DTLTransportHandler::Received_Connection)(DTLTransportHandler handler, DTLConnection connection, uint32 size, uint8 *packet, DOFAddress address, DOFAddressType type)

Report a new packet received on a Connection.

Called by a Transport when a full packet has been received by a Connection. If the specified connection is asynchronous, then this method will not block.

Note
Ownership of the packet is transferred to the Transport Handler. The data pointer must be the result of a call to PCRMem_Alloc, and will be freed by the Transport Handler when it is finished with the packet using PCRMem_Free.

This callback must not be NULL.

Parameters
handlerThe TransportHandler associated with Connection. This must not be NULL.
connectionThe connection that received the packet. This must not be NULL.
sizeThe number of bytes in packet. This should be greater than 0.
packetThe received packet. This should not be NULL (unless size is 0).
addressThe address where the packet came from. This must not be NULL.
typeThe type of packet received on the connection (a DOFAddressType).
Resource Management:
This function allocates resources that must later be freed by calling PCRMem_Free. packet
Returns
TRUE if handler accepted packet, FALSE otherwise.
core-c-dof-oal Version 8.0.1 Build 0
2018-01-22