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

tcp client resolve mdns

This commit is contained in:
wellenvogel
2022-01-03 13:37:35 +01:00
parent f0a4cfcc53
commit 469b801e04
3 changed files with 139 additions and 22 deletions

View File

@@ -150,6 +150,7 @@ size_t GwSocketServer::sendToClients(const char *buf, int source,bool partial)
{
if (!clients)
return 0;
bool hasSend=false;
int len = strlen(buf);
int sourceIndex = source - minId;
for (int i = 0; i < maxClients; i++)
@@ -161,10 +162,10 @@ size_t GwSocketServer::sendToClients(const char *buf, int source,bool partial)
continue;
if (client->connected())
{
client->enqueue((uint8_t *)buf, len);
if(client->enqueue((uint8_t *)buf, len)) hasSend=true;
}
}
return len;
return hasSend?len:0;
}
int GwSocketServer::numClients()