1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-16 07:23:07 +01:00

different modes for UDP writer, allow to select network

This commit is contained in:
andreas
2024-11-07 19:47:27 +01:00
parent 490a5b9ba1
commit a5827e24d8
4 changed files with 250 additions and 24 deletions

View File

@@ -17,4 +17,9 @@ class GwSocketHelper{
if (setsockopt(socket, IPPROTO_TCP, TCP_KEEPCNT, &val, sizeof(val)) != ESP_OK) return false;
return true;
}
static bool isMulticast(const String &addr){
in_addr iaddr;
if (inet_pton(AF_INET,addr.c_str(),&iaddr) != 1) return false;
return IN_MULTICAST(ntohl(iaddr.s_addr));
}
};