Allow any instance of Client to be passed in.

Added new example for publishing in callback.
This commit is contained in:
Nicholas O'Leary
2012-09-13 22:35:48 +01:00
parent 2d43044338
commit a971ed4a2c
6 changed files with 109 additions and 45 deletions

View File

@ -19,7 +19,8 @@ void callback(char* topic, byte* payload, unsigned int length) {
// handle message arrived
}
PubSubClient client(server, 1883, callback);
EthernetClient ethClient;
PubSubClient client(server, 1883, callback, ethClient);
void setup()
{