mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
update to 1.7.0
This commit is contained in:
@@ -38,9 +38,10 @@ bool ClientPosix::connect(IPAddress ip, uint16_t port) {
|
||||
memset(&_host, 0, sizeof(_host));
|
||||
_host.sin_family = AF_INET;
|
||||
_host.sin_addr.s_addr = htonl(uint32_t(ip));
|
||||
_host.sin_port = htons(port); // modified by proddy for EMS-ESP compiling standalone
|
||||
_host.sin_port = ::htons(port);
|
||||
|
||||
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));
|
||||
return false;
|
||||
|
||||
@@ -8,7 +8,7 @@ the LICENSE file.
|
||||
|
||||
#if defined(__linux__)
|
||||
|
||||
#include "IPAddress.h"
|
||||
#include "ClientPosixIPAddress.h"
|
||||
|
||||
IPAddress::IPAddress()
|
||||
: _address(0) {
|
||||
@@ -17,7 +17,6 @@ the LICENSE file.
|
||||
#else
|
||||
#include <WiFiClient.h>
|
||||
#endif
|
||||
|
||||
#include "Transport.h"
|
||||
|
||||
namespace espMqttClientInternals {
|
||||
@@ -32,6 +31,7 @@ class ClientSecureSync : public Transport {
|
||||
void stop() override;
|
||||
bool connected() override;
|
||||
bool disconnected() override;
|
||||
// added for EMS-ESP
|
||||
#if defined(EMC_CLIENT_SECURE)
|
||||
WiFiClientSecure client;
|
||||
#else
|
||||
|
||||
@@ -10,7 +10,7 @@ the LICENSE file.
|
||||
|
||||
#include <stddef.h> // size_t
|
||||
|
||||
#include "IPAddress.h"
|
||||
#include "ClientPosixIPAddress.h"
|
||||
|
||||
namespace espMqttClientInternals {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user