-
Notifications
You must be signed in to change notification settings - Fork 498
Description
We currently require receive sockets to return std::unique_ptr<cetl::byte, PmrRawBytesDeleter> payload_ptr which forces the use of a PmrRawBytesDeleter which is incorrect for FreeRTOS zero copy. Instead I need a deleter that invokes FreeRTOS_ReleaseUDPPayloadBuffer.
We could just set the deleter type in libcyphal/config.hpp (see #419). This doesn't support heterogenous socket implementations however. Other ideas are welcome. We should also plan for different media layers that may need an additional data pointer as well; one for the payload data and another that is the key for the buffer in a memory pool (where the two are not the same thing. I'd tell you how FreeRTOS+TCP avoids the need for this additional data but you really don't want to know).