update espMqttclient

This commit is contained in:
technyon
2024-03-02 04:30:46 +01:00
parent e92d0e9ac9
commit 7219ddd556
36 changed files with 667 additions and 210 deletions

View File

@@ -40,7 +40,7 @@ bool ClientPosix::connect(IPAddress ip, uint16_t port) {
_host.sin_addr.s_addr = htonl(uint32_t(ip));
_host.sin_port = ::htons(port);
int ret = ::connect(_sockfd, (struct sockaddr *)&_host, sizeof(_host));
int ret = ::connect(_sockfd, reinterpret_cast<sockaddr*>(&_host), sizeof(_host));
if (ret < 0) {
emc_log_e("Error connecting: %d - (%d) %s", ret, errno, strerror(errno));

View File

@@ -43,7 +43,7 @@ class ClientPosix : public Transport {
protected:
int _sockfd;
struct sockaddr_in _host;
sockaddr_in _host;
};
} // namespace espMqttClientInternals

View File

@@ -8,7 +8,7 @@ the LICENSE file.
#if defined(__linux__)
#include "IPAddress.h"
#include "ClientPosixIPAddress.h"
IPAddress::IPAddress()
: _address(0) {

View File

@@ -10,7 +10,7 @@ the LICENSE file.
#include <stddef.h> // size_t
#include "IPAddress.h"
#include "ClientPosixIPAddress.h"
namespace espMqttClientInternals {