Add wider IPAddress support in api

This commit is contained in:
Nick O'Leary
2015-08-27 14:18:16 +01:00
parent c753ecaebe
commit 12a9d89ea2
6 changed files with 98 additions and 46 deletions

View File

@@ -1,6 +1,6 @@
/*
Basic MQTT example
Basic MQTT example
- connects to an MQTT server
- publishes "hello world" to the topic "outTopic"
- subscribes to the topic "inTopic"
@@ -12,8 +12,8 @@
// Update these with values suitable for your network.
byte mac[] = { 0xDE, 0xED, 0xBA, 0xFE, 0xFE, 0xED };
byte server[] = { 172, 16, 0, 2 };
byte ip[] = { 172, 16, 0, 100 };
IPAddress ip(172, 16, 0, 100);
IPAddress server(172, 16, 0, 2);
void callback(char* topic, byte* payload, unsigned int length) {
// handle message arrived
@@ -35,4 +35,3 @@ void loop()
{
client.loop();
}