180 size_t _bufferSize{};
181 size_t _bufferWritePos{};
182 unsigned long _keepAliveMillis{};
183 unsigned long _socketTimeoutMillis{};
184 uint16_t _nextMsgId{};
185 unsigned long _lastOutActivity{};
186 unsigned long _lastInActivity{};
187 bool _pingOutstanding{};
188 MQTT_CALLBACK_SIGNATURE{};
195 size_t readPacket(uint8_t* hdrLen);
196 bool handlePacket(uint8_t hdrLen,
size_t len);
197 bool readByte(uint8_t* result);
198 bool readByte(uint8_t* result,
size_t* pos);
199 uint8_t buildHeader(uint8_t header,
size_t length);
200 bool writeControlPacket(uint8_t header,
size_t length);
201 size_t writeBuffer(
size_t pos,
size_t size);
202 size_t writeString(
const char*
string,
size_t pos);
203 size_t writeNextMsgId(
size_t pos);
206 size_t appendBuffer(uint8_t data);
207 size_t flushBuffer();
229 PubSubClient(IPAddress addr, uint16_t port, Client& client);
238 PubSubClient(IPAddress addr, uint16_t port, Client& client, Stream& stream);
248 PubSubClient(IPAddress addr, uint16_t port, MQTT_CALLBACK_SIGNATURE, Client& client);
259 PubSubClient(IPAddress addr, uint16_t port, MQTT_CALLBACK_SIGNATURE, Client& client, Stream& stream);
267 PubSubClient(uint8_t* ip, uint16_t port, Client& client);
276 PubSubClient(uint8_t* ip, uint16_t port, Client& client, Stream& stream);
286 PubSubClient(uint8_t* ip, uint16_t port, MQTT_CALLBACK_SIGNATURE, Client& client);
297 PubSubClient(uint8_t* ip, uint16_t port, MQTT_CALLBACK_SIGNATURE, Client& client, Stream& stream);
305 PubSubClient(
const char* domain, uint16_t port, Client& client);
314 PubSubClient(
const char* domain, uint16_t port, Client& client, Stream& stream);
324 PubSubClient(
const char* domain, uint16_t port, MQTT_CALLBACK_SIGNATURE, Client& client);
335 PubSubClient(
const char* domain, uint16_t port, MQTT_CALLBACK_SIGNATURE, Client& client, Stream& stream);
441 bool connect(
const char*
id,
const char* user,
const char* pass);
454 bool connect(
const char*
id,
const char* willTopic, uint8_t willQos,
bool willRetain,
const char* willMessage);
471 bool connect(
const char*
id,
const char* user,
const char* pass,
const char* willTopic, uint8_t willQos,
bool willRetain,
const char* willMessage);
489 bool connect(
const char*
id,
const char* user,
const char* pass,
const char* willTopic, uint8_t willQos,
bool willRetain,
const char* willMessage,
504 bool publish(
const char* topic,
const char* payload);
514 bool publish(
const char* topic,
const char* payload,
bool retained);
525 bool publish(
const char* topic,
const char* payload, uint8_t qos,
bool retained);
535 bool publish(
const char* topic,
const uint8_t* payload,
size_t plength);
546 bool publish(
const char* topic,
const uint8_t* payload,
size_t plength,
bool retained);
558 bool publish(
const char* topic,
const uint8_t* payload,
size_t plength, uint8_t qos,
bool retained);
568 bool publish_P(
const char* topic,
const char* payload,
bool retained);
579 bool publish_P(
const char* topic,
const char* payload, uint8_t qos,
bool retained);
590 bool publish_P(
const char* topic,
const uint8_t* payload,
size_t plength,
bool retained);
602 bool publish_P(
const char* topic,
const uint8_t* payload,
size_t plength, uint8_t qos,
bool retained);
618 bool beginPublish(
const char* topic,
size_t plength,
bool retained);
635 bool beginPublish(
const char* topic,
size_t plength, uint8_t qos,
bool retained);
651 virtual size_t write(uint8_t data);
661 virtual size_t write(
const uint8_t* buf,
size_t size);
671 size_t write_P(
const uint8_t* buf,
size_t size);
688 bool subscribe(
const char* topic, uint8_t qos);