knolleary / pubsubclient

A client library for the Arduino Ethernet Shield that provides support for MQTT.
http://pubsubclient.knolleary.net/
MIT License
3.78k stars 1.46k forks source link

Docs on set/get buffer size contradicting #1015

Open jpmeijers opened 1 year ago

jpmeijers commented 1 year ago

The documention at https://pubsubclient.knolleary.net/api#setBufferSize refers to MQTT_MAX_MESSAGE_SIZE and that the default size is 256 bytes. Later on the same page https://pubsubclient.knolleary.net/api#setBufferSize it refers to MQTT_MAX_PACKET_SIZE with default size 128 bytes.

Looking at the source code the currently used define is calle MQTT_MAX_PACKET_SIZE and has a default size of 256 bytes.

superbool commented 11 months ago

I guess MQTT_MAX_MESSAGE_SIZE is old used, and the doc not changed it.