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

1.7 KiB

tag, type, title
tag type title
docs other Configuration Options

The following configuration options can be used to configure the library. They are contained in PubSubClient.h.

MQTT_MAX_PACKET_SIZE
Sets the largest packet size, in bytes, the client will handle. Any packet received that exceeds this size will be ignored.

This value can be overridden by calling setBufferSize(size).

Default: 128 bytes

MQTT_KEEPALIVE
Sets the keepalive interval, in seconds, the client will use. This is used to maintain the connection when no other packets are being sent or received.

This value can be overridden by calling setKeepAlive(keepAlive).

Default: 15 seconds

MQTT_VERSION
Sets the version of the MQTT protocol to use.

Default: MQTT 3.1.1

MQTT_MAX_TRANSFER_SIZE
Sets the maximum number of bytes passed to the network client in each write call. Some hardware has a limit to how much data can be passed to them in one go, such as the Arduino Wifi Shield.

Default: undefined (complete packet passed in each write call)

MQTT_SOCKET_TIMEOUT
Sets the timeout when reading from the network. This also applies as the timeout for calls to connect.

This value can be overridden by calling setSocketTimeout(timeout).

Default: 15 seconds