You've already forked Adafruit_MQTT_Library
mirror of
https://github.com/adafruit/Adafruit_MQTT_Library.git
synced 2025-07-11 12:21:46 +03:00
Corrected client public/private methods.
Switched the following four methods from public to protected in Adafruit_MQTT_Client and Adafruit_MQTT_FONA: 1. connectServer 2. disconnectServer 3. readPacket 4. sendPacket When public (previously) they could be called by users of this library, which is not the intent of this API.
This commit is contained in:
@ -41,11 +41,14 @@ public:
|
||||
const char *user = "", const char *pass = "")
|
||||
: Adafruit_MQTT(server, port, user, pass), client(client) {}
|
||||
|
||||
bool connectServer();
|
||||
bool disconnectServer();
|
||||
bool connected();
|
||||
uint16_t readPacket(uint8_t *buffer, uint16_t maxlen, int16_t timeout);
|
||||
bool sendPacket(uint8_t *buffer, uint16_t len);
|
||||
bool connected() override;
|
||||
|
||||
protected:
|
||||
bool connectServer() override;
|
||||
bool disconnectServer() override;
|
||||
uint16_t readPacket(uint8_t *buffer, uint16_t maxlen,
|
||||
int16_t timeout) override;
|
||||
bool sendPacket(uint8_t *buffer, uint16_t len) override;
|
||||
|
||||
private:
|
||||
Client *client;
|
||||
|
Reference in New Issue
Block a user