forked from knolleary/pubsubclient
-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is it needed that we copy the payload to the buffer?
pubsubclient3/src/PubSubClient.cpp
Lines 439 to 442 in 989de7f
| // Add payload | |
| for (size_t i = 0; i < plength; i++) { | |
| this->buffer[length++] = payload[i]; | |
| } |
instead we could just use
write(payload, plength);
and write the header / topic stuff before ... (e.g. by using the beginPublish() function).
This way we could send longer messages without the need to increase the buffer size.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request