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

Unified Diff: net/quic/quic_stream_factory.h

Issue 107803002: Consistently suggest ephemeral port for QUIC client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to TOT Created 7 years 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
« no previous file with comments | « net/quic/port_suggester_unittest.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.h
diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h
index ae0add0e33508d2c6f3199952d7f21ea05940f32..6d4d413b5e63b5771b1dbba6bba173f29fdf6287 100644
--- a/net/quic/quic_stream_factory.h
+++ b/net/quic/quic_stream_factory.h
@@ -230,6 +230,14 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
base::WeakPtrFactory<QuicStreamFactory> weak_factory_;
+ // Each profile will (probably) have a unique port_entropy_ value. This value
+ // is used to help seed a pseudo-random number generator (PortSuggester) so
+ // that we consistently (within this profile) suggest the same ephemeral port
+ // when we re-connect to any given server/port. The differences between
+ // profiles (probablistically) prevent two profiles from colliding in their
+ // ephemeral port requests.
+ uint64 port_entropy_;
wtc 2013/12/13 22:06:24 Nit: maybe this member should be renamed "port_see
+
DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory);
};
« no previous file with comments | « net/quic/port_suggester_unittest.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698