niMQTT
Dependencies: EthernetInterface mbed-rtos
Fork of niMQTT by
Diff: niMQTT.h
- Revision:
- 1:4faa96fa4350
- Parent:
- 0:d4dfed20c6ea
- Child:
- 4:afbc7b066cff
--- a/niMQTT.h Wed Aug 07 12:57:21 2013 +0000 +++ b/niMQTT.h Wed Aug 07 13:33:54 2013 +0000 @@ -48,7 +48,7 @@ #define LEAST_ONCE LEAST_ONCE_NUM << 1 #define EXACTLY_ONCE EXACTLY_ONCE_NUM << 1 -#define KEEP_ALIVE 300 // seconds +#define KEEP_ALIVE 100 // seconds #define TIMEOUT 1000 // ms #define START_THREAD 1 @@ -57,14 +57,14 @@ public: /** Initialise and launch the MQTT Client * \param server the address of your server - * \param port the port of your server + * \param callback a callback to execute on receiving a PUBLISH * \param id the id of this client (should be unique) - * \param callback a callback to execute on receiving a PUBLISH + * \param port the port of your server * \param username your username for the server * \param password your password for the server * \param debug get a more verbose output */ - niMQTT(char *server, int port=1884, char *id="mbed", void (*callback)(char *, char*), char *username="", char *password="", bool debug=false); + niMQTT(char *server, void (*callback)(char *, char*), char *id="mbed", int port=1883, char *username="", char *password="", bool debug=false); ~niMQTT(); /* Publish a message on a topic