mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-14 03:40:22 +03:00
update to 1.7.0
This commit is contained in:
32
lib/espMqttClient/src/Transport/ClientPosixIPAddress.cpp
Normal file
32
lib/espMqttClient/src/Transport/ClientPosixIPAddress.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
Copyright (c) 2022 Bert Melis. All rights reserved.
|
||||
|
||||
This work is licensed under the terms of the MIT license.
|
||||
For a copy, see <https://opensource.org/licenses/MIT> or
|
||||
the LICENSE file.
|
||||
*/
|
||||
|
||||
#if defined(__linux__)
|
||||
|
||||
#include "ClientPosixIPAddress.h"
|
||||
|
||||
IPAddress::IPAddress()
|
||||
: _address(0) {
|
||||
// empty
|
||||
}
|
||||
|
||||
IPAddress::IPAddress(uint8_t p0, uint8_t p1, uint8_t p2, uint8_t p3)
|
||||
: _address(0) {
|
||||
_address = (uint32_t)p0 << 24 | (uint32_t)p1 << 16 | (uint32_t)p2 << 8 | p3;
|
||||
}
|
||||
|
||||
IPAddress::IPAddress(uint32_t address)
|
||||
: _address(address) {
|
||||
// empty
|
||||
}
|
||||
|
||||
IPAddress::operator uint32_t() {
|
||||
return _address;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user