int err = 0;
int ret = 0; // Check for protocols in a do-while loop until we provide a buffer large // enough. (WSCEnumProtocols sets protbuff_size to its desired value). // It is extremely unlikely that this will loop more than once. do {
protocols.reset(new char[protbuff_size]);
protocol_infos = reinterpret_cast<LPWSAPROTOCOL_INFOW>(protocols.get());
ret = WSCEnumProtocols(requested_protocols, protocol_infos, &protbuff_size,
&err);
} while (ret == SOCKET_ERROR && err == WSAENOBUFS);
if (ret == SOCKET_ERROR) { return false;
}
// Even if ret is positive, check specifically for IPv6. // Non-IPv6 enabled WinXP will still return a RAW protocol.
for (int i = 0; i < ret; ++i) {
if (protocol_infos[i].iAddressFamily == AF_INET6) { returntrue;
}
} return false; #elifdefined(WEBRTC_POSIX) bool has_ipv6 = false; struct ifaddrs* ifa;
if (getifaddrs(&ifa) < 0) { return false;
}
for (struct ifaddrs* cur = ifa; cur != nullptr; cur = cur->ifa_next) {
if (cur->ifa_addr != nullptr && cur->ifa_addr->sa_family == AF_INET6) {
has_ipv6 = true; break;
}
}
freeifaddrs(ifa); return has_ipv6; #else returntrue; #endif
}
} // namespace webrtc
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.23 Sekunden
(vorverarbeitet am 2026-08-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.