Skip to content

Commit 8d6fde8

Browse files
committed
ethernet: add http init to constructors
1 parent 3ae10c3 commit 8d6fde8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

AdafruitIO_Ethernet.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,15 @@ class AdafruitIO_Ethernet : public AdafruitIO {
3131
AdafruitIO_Ethernet(const char *user, const char *key):AdafruitIO(user, key)
3232
{
3333
_client = new EthernetClient();
34-
_mqtt = new Adafruit_MQTT_Client(_client, _host, _port);
34+
_mqtt = new Adafruit_MQTT_Client(_client, _host, _mqtt_port);
35+
_http = new HttpClient(*_client, _host, _http_port);
3536
}
3637

3738
AdafruitIO_Ethernet(const __FlashStringHelper *user, const __FlashStringHelper *key):AdafruitIO(user, key)
3839
{
3940
_client = new EthernetClient();
40-
_mqtt = new Adafruit_MQTT_Client(_client, _host, _port);
41+
_mqtt = new Adafruit_MQTT_Client(_client, _host, _mqtt_port);
42+
_http = new HttpClient(*_client, _host, _http_port);
4143
}
4244

4345
aio_status_t networkStatus()

0 commit comments

Comments
 (0)