Update documentation for dynamic buffer resizing.
This commit is contained in:
parent
e21ac7baae
commit
5b23a97fb0
@ -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.
|
- 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
|
- 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
|
- The keepalive interval is set to 15 seconds by default. This is configurable
|
||||||
via `MQTT_KEEPALIVE` in `PubSubClient.h`.
|
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
|
- The client uses MQTT 3.1.1 by default. It can be changed to use MQTT 3.1 by
|
||||||
|
@ -27,9 +27,9 @@ void setup()
|
|||||||
{
|
{
|
||||||
Ethernet.begin(mac, ip);
|
Ethernet.begin(mac, ip);
|
||||||
// Note - the default maximum packet size is 128 bytes. If the
|
// Note - the default maximum packet size is 128 bytes. If the
|
||||||
// combined length of clientId, username and password exceed this,
|
// combined length of clientId, username and password exceed this use the
|
||||||
// you will need to increase the value of MQTT_MAX_PACKET_SIZE in
|
// following to increase the buffer size:
|
||||||
// PubSubClient.h
|
// client.setBufferSize(255);
|
||||||
|
|
||||||
if (client.connect("arduinoClient", "testuser", "testpass")) {
|
if (client.connect("arduinoClient", "testuser", "testpass")) {
|
||||||
client.publish("outTopic","hello world");
|
client.publish("outTopic","hello world");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user