Added default constructor

This commit is contained in:
Nicholas O'Leary 2010-07-27 16:08:51 +01:00
parent a937a97659
commit 07547e2ec0
2 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,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;
}

View File

@ -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*);