Adafruit_MQTT_Library icon indicating copy to clipboard operation
Adafruit_MQTT_Library copied to clipboard

Changing ServerName

Open MolsonB opened this issue 8 years ago • 0 comments

I don't know how to do the pull request, but here is a function to change the servername (ipaddress) once defined. I have a system where it tries the main IP address, and if it doesn't connect to go to the backup IP address.

.h void setServer(const char *server, uint16_t port);

.cpp void Adafruit_MQTT::setServer(const char *server, uint16_t port) { servername = server; portnum = port; }

MolsonB avatar Sep 21 '17 03:09 MolsonB