Skip to content

Does not compile on ESP8266 when calling connect() with port #106

@ferdinand0815

Description

@ferdinand0815

The library fails to compile on ESP8266 when calling connect() with a port, as in mqttClient.connect(mqttBrokerIp, mqttPort).

error: call of overloaded 'connect(IPAddress&, uint16_t&)' is ambiguous

ArduinoMqttClient/src/MqttClient.h:82:15: note: candidate: 'virtual int MqttClient::connect(IPAddress, uint16_t)'
   82 |   virtual int connect(IPAddress ip, uint16_t port = 1883);
      |               ^~~~~~~
/home/ffelder/Arduino/libraries/ArduinoMqttClient/src/MqttClient.h:85:15: note: candidate: 'virtual int MqttClient::connect(const IPAddress&, uint16_t)'
   85 |   virtual int connect(const IPAddress& ip, uint16_t port) { return 0; }; /* ESP8266 core defines this pure virtual in Client.h */
      |               ^~~~~~~

This has actually already been fixed quite some time ago in this pull request #33 by removing the ESP8266 specific code in MqttClient.h. I briefly tested the connect() using test.mosquitto.org, no idea about flush and stop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy