Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
ef75340e6e | |||
07547e2ec0 |
@ -1,3 +1,7 @@
|
||||
1.5
|
||||
* Added default constructor
|
||||
* Fixed compile error when used with arduino-0021 or later
|
||||
|
||||
1.4
|
||||
* Fixed connection lost handling
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
http://knolleary.net
|
||||
*/
|
||||
|
||||
#include "WConstants.h"
|
||||
#include "PubSubClient.h"
|
||||
#include "Client.h"
|
||||
#include "string.h"
|
||||
@ -13,6 +12,9 @@
|
||||
#define MQTTPUBLISH 3<<4
|
||||
#define MQTTSUBSCRIBE 8<<4
|
||||
|
||||
PubSubClient::PubSubClient() : _client(0) {
|
||||
}
|
||||
|
||||
PubSubClient::PubSubClient(uint8_t *ip, uint16_t port, void (*callback)(char*,uint8_t*,int)) : _client(ip,port) {
|
||||
this->callback = callback;
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ private:
|
||||
int write(uint8_t header, uint8_t* buf, uint8_t length);
|
||||
uint8_t writeString(char* string, uint8_t* buf, uint8_t pos);
|
||||
public:
|
||||
PubSubClient();
|
||||
PubSubClient(uint8_t *, uint16_t, void(*)(char*,uint8_t*,int));
|
||||
int connect(char *);
|
||||
int connect(char*, char*, uint8_t, uint8_t, char*);
|
||||
|
Reference in New Issue
Block a user