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

611 B

tag type name params returns
api function setSocketTimeout
name description type
timeout the socket timeout, in seconds uint16_t
type values
PubSubClient*
value description
PubSubClient* the client instance, allowing the function to be chained

Sets the socket timeout used by the client. This determines how long the client will wait for incoming data when it expects data to arrive - for example, whilst it is in the middle of reading an MQTT packet.

By default, it is set to 15 seconds - as defined by the MQTT_SOCKET_TIMEOUT constant in PubSubClient.h.