Added MDNS and driver support for multicast

This commit is contained in:
robert authored and Sergio R. Caprile committed 2025-04-22 12:55:15 -03:00
1 parent b44193780e
commit 6f697db49d
31 files changed
+766 -168

No files matched your search

+10
View File
@@ -1129,6 +1129,10 @@ void mg_connect_resolved(struct mg_connection *c) {
bool mg_open_listener(struct mg_connection *c, const char *url) {
c->loc.port = mg_htons(mg_url_port(url));
if (!mg_aton(mg_url_host(url), &c->loc)) {
MG_ERROR(("invalid listening URL: %s", url));
return false;
}
return true;
}
@@ -1216,4 +1220,10 @@ bool mg_send(struct mg_connection *c, const void *buf, size_t len) {
}
return res;
}
#if MG_TCPIP_MCAST
const uint8_t mcast_addr[6] = {0x01, 0x00, 0x5e, 0x00, 0x00, 0xfb};
void mg_mcast_add(char *ip, MG_SOCKET_TYPE fd) { (void) ip; (void) fd; }
#endif
#endif // MG_ENABLE_TCPIP