/* * Copyright 2015 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
using stunprober::AsyncCallback; using stunprober::StunProber;
ABSL_FLAG(int,
interval,
10, "Interval of consecutive stun pings in milliseconds");
ABSL_FLAG(bool,
shared_socket, false, "Share socket mode for different remote IPs");
ABSL_FLAG(int,
pings_per_ip,
10, "Number of consecutive stun pings to send for each IP");
ABSL_FLAG(int,
timeout,
1000, "Milliseconds of wait after the last ping sent before exiting");
ABSL_FLAG(
std::string,
servers, "stun.l.google.com:19302,stun1.l.google.com:19302,stun2.l.google.com:19302", "Comma separated STUN server addresses with ports");
namespace {
constchar* PrintNatType(stunprober::NatType type) { switch (type) { case stunprober::NATTYPE_NONE: return"Not behind a NAT"; case stunprober::NATTYPE_UNKNOWN: return"Unknown NAT type"; case stunprober::NATTYPE_SYMMETRIC: return"Symmetric NAT"; case stunprober::NATTYPE_NON_SYMMETRIC: return"Non-Symmetric NAT"; default: return"Invalid";
}
}
void PrintStats(StunProber* prober) {
StunProber::Stats stats; if (!prober->GetStats(&stats)) {
RTC_LOG(LS_WARNING) << "Results are inconclusive."; return;
}
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.