Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2683)

Unified Diff: webrtc/p2p/stunprober/stunprober.h

Issue 1166013002: Better determination of Symmetric NAT (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/p2p/stunprober/stunprober.h
diff --git a/webrtc/p2p/stunprober/stunprober.h b/webrtc/p2p/stunprober/stunprober.h
index 9352e36dbc574f2346046381b73484939c792a30..f7068b447f60484b46b5d6c5589cb8e37ce3530d 100644
--- a/webrtc/p2p/stunprober/stunprober.h
+++ b/webrtc/p2p/stunprober/stunprober.h
@@ -137,12 +137,20 @@ class StunProber {
READ_FAILED, // Reading the reply from the server failed.
};
+ enum NATTYPE {
pthatcher2 2015/06/05 22:39:41 NatType, please.
guoweis_webrtc 2015/06/07 17:29:40 Done.
+ NATTYPE_UNKNOWN,
+ NATTYPE_NO_NAT,
+ NATTYPE_NAT_TYPE_UNKNOWN,
+ NATTYPE_SYM_NAT,
+ NATTYPE_NON_SYM_NAT
+ };
+
struct Stats {
Stats() {}
+
int num_request_sent = 0;
int num_response_received = 0;
- bool behind_nat = false;
- bool symmetric_nat = false;
+ NATTYPE nat_type = NATTYPE_UNKNOWN;
int average_rtt_ms = -1;
int success_percent = 0;
int target_request_interval_ns = 0;
@@ -188,7 +196,7 @@ class StunProber {
// Method to retrieve the Stats once |finish_callback| is invoked. Returning
// false when the result is inconclusive, for example, whether it's behind a
// NAT or not.
- bool GetStats(Stats* stats);
+ bool GetStats(Stats* stats) const;
private:
// A requester tracks the requests and responses from a single socket to many

Powered by Google App Engine
This is Rietveld 408576698