Update documentation for dynamic buffer resizing.

This commit is contained in:
duncan law 2017-04-30 10:43:18 +01:00
parent e21ac7baae
commit 5b23a97fb0
2 changed files with 5 additions and 4 deletions

View File

@ -14,7 +14,8 @@ Full API documentation is available here: http://pubsubclient.knolleary.net
- It can only publish QoS 0 messages. It can subscribe at QoS 0 or QoS 1.
- The maximum message size, including header, is **128 bytes** by default. This
is configurable via `MQTT_MAX_PACKET_SIZE` in `PubSubClient.h`.
is configurable via `MQTT_MAX_PACKET_SIZE` in `PubSubClient.h` or at runtime
using PubSubClient::setBufferSize().
- The keepalive interval is set to 15 seconds by default. This is configurable
via `MQTT_KEEPALIVE` in `PubSubClient.h`.
- The client uses MQTT 3.1.1 by default. It can be changed to use MQTT 3.1 by

View File

@ -27,9 +27,9 @@ void setup()
{
Ethernet.begin(mac, ip);
// Note - the default maximum packet size is 128 bytes. If the
// combined length of clientId, username and password exceed this,
// you will need to increase the value of MQTT_MAX_PACKET_SIZE in
// PubSubClient.h
// combined length of clientId, username and password exceed this use the
// following to increase the buffer size:
// client.setBufferSize(255);
if (client.connect("arduinoClient", "testuser", "testpass")) {
client.publish("outTopic","hello world");