Open savagerex opened 1 year ago
if i chage "MQTT_MAX_PACKET_SIZE" from 256 to 72000.
how to modified this function (as below)???
boolean PubSubClient::setBufferSize(uint16_t size) { if (size == 0) { // Cannot set it back to 0 return false; } if (this->bufferSize == 0) { this->buffer = (uint8_t)malloc(size); } else { uint8_t newBuffer = (uint8_t*)realloc(this->buffer, size); if (newBuffer != NULL) { this->buffer = newBuffer; } else { return false; } } this->bufferSize = size; return (this->buffer != NULL); }
Hi @savagerex .. I have the same issue.. I would like to understand if it is possible to increase the packet size chaning the lib.. Did you get any results?
if i chage "MQTT_MAX_PACKET_SIZE" from 256 to 72000.
how to modified this function (as below)???
boolean PubSubClient::setBufferSize(uint16_t size) { if (size == 0) { // Cannot set it back to 0 return false; } if (this->bufferSize == 0) { this->buffer = (uint8_t)malloc(size); } else { uint8_t newBuffer = (uint8_t*)realloc(this->buffer, size); if (newBuffer != NULL) { this->buffer = newBuffer; } else { return false; } } this->bufferSize = size; return (this->buffer != NULL); }