Files
pubsubclient/_posts/2000-06-05-setBufferSize.md
2020-05-21 01:17:42 +01:00

968 B

tag, type, name, params, returns
tag type name params returns
api function setBufferSize
name description type
size the size, in bytes, for the internal buffer uint16_t
type values
boolean
value description
false the buffer could not be resized
value description
true the buffer was resized

Sets the size, in bytes, of the internal send/receive buffer. This must be large enough to contain the full MQTT packet. When sending or receiving messages, the packet will contain the full topic string, the payload data and a small number of header bytes.

By default, it is set to 256 bytes - as defined by the MQTT_MAX_MESSAGE_SIZE constant in PubSubClient.h.

Note : setBufferSize returns a boolean flag to indicate whether it was able to reallocate the memory to change the buffer size. This means, unlike the other setXYZ functions that return a reference to the client, this function cannot be chained with those functions.