![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MQTT client needs buffers for both transmitting and receiving messages. Whenever it needs a buffer, it invokes mqttconfigGET_FREE_BUFFER_FXN function to get a buffer and after it is done it invokes mqttconfigRETURN_BUFFER_FXN to return the buffer. By default, BUFFERPOOL_GetFreeBuffer and BUFFERPOOL_ReturnBuffer functions are used to get and return buffers from the central buffer pool. The user can change the buffer management functions for MQTT client by defining mqttconfigGET_FREE_BUFFER_FXN and mqttconfigRETURN_BUFFER_FXN macros. The user should implement the two functions having signatures same as BUFFERPOOL_GetFreeBuffer and BUFFERPOOL_ReturnBuffer and then define the macros in BufferPoolConfig.h: