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

Side by Side Diff: net/quic/quic_connection.h

Issue 1305293004: Notfiy NQE of QUIC RTT (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated with more comments and tests Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // The entity that handles framing writes for a Quic client or server. 5 // The entity that handles framing writes for a Quic client or server.
6 // Each QuicSession will have a connection associated with it. 6 // Each QuicSession will have a connection associated with it.
7 // 7 //
8 // On the server side, the Dispatcher handles the raw reads, and hands off 8 // On the server side, the Dispatcher handles the raw reads, and hands off
9 // packets via ProcessUdpPacket for framing and processing. 9 // packets via ProcessUdpPacket for framing and processing.
10 // 10 //
(...skipping 11 matching lines...) Expand all
22 #include <map> 22 #include <map>
23 #include <queue> 23 #include <queue>
24 #include <string> 24 #include <string>
25 #include <vector> 25 #include <vector>
26 26
27 #include "base/basictypes.h" 27 #include "base/basictypes.h"
28 #include "base/logging.h" 28 #include "base/logging.h"
29 #include "base/memory/scoped_ptr.h" 29 #include "base/memory/scoped_ptr.h"
30 #include "base/strings/string_piece.h" 30 #include "base/strings/string_piece.h"
31 #include "net/base/ip_endpoint.h" 31 #include "net/base/ip_endpoint.h"
32 #include "net/base/socket_performance_watcher.h"
32 #include "net/quic/crypto/quic_decrypter.h" 33 #include "net/quic/crypto/quic_decrypter.h"
33 #include "net/quic/quic_ack_notifier.h" 34 #include "net/quic/quic_ack_notifier.h"
34 #include "net/quic/quic_ack_notifier_manager.h" 35 #include "net/quic/quic_ack_notifier_manager.h"
35 #include "net/quic/quic_alarm.h" 36 #include "net/quic/quic_alarm.h"
36 #include "net/quic/quic_blocked_writer_interface.h" 37 #include "net/quic/quic_blocked_writer_interface.h"
37 #include "net/quic/quic_connection_stats.h" 38 #include "net/quic/quic_connection_stats.h"
38 #include "net/quic/quic_packet_creator.h" 39 #include "net/quic/quic_packet_creator.h"
39 #include "net/quic/quic_packet_generator.h" 40 #include "net/quic/quic_packet_generator.h"
40 #include "net/quic/quic_packet_writer.h" 41 #include "net/quic/quic_packet_writer.h"
41 #include "net/quic/quic_protocol.h" 42 #include "net/quic/quic_protocol.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 public: 278 public:
278 virtual ~PacketWriterFactory() {} 279 virtual ~PacketWriterFactory() {}
279 280
280 virtual QuicPacketWriter* Create(QuicConnection* connection) const = 0; 281 virtual QuicPacketWriter* Create(QuicConnection* connection) const = 0;
281 }; 282 };
282 283
283 // Constructs a new QuicConnection for |connection_id| and |address|. Invokes 284 // Constructs a new QuicConnection for |connection_id| and |address|. Invokes
284 // writer_factory->Create() to get a writer; |owns_writer| specifies whether 285 // writer_factory->Create() to get a writer; |owns_writer| specifies whether
285 // the connection takes ownership of the returned writer. |helper| must 286 // the connection takes ownership of the returned writer. |helper| must
286 // outlive this connection. 287 // outlive this connection.
287 QuicConnection(QuicConnectionId connection_id, 288 QuicConnection(
288 IPEndPoint address, 289 QuicConnectionId connection_id,
289 QuicConnectionHelperInterface* helper, 290 IPEndPoint address,
290 const PacketWriterFactory& writer_factory, 291 QuicConnectionHelperInterface* helper,
291 bool owns_writer, 292 const PacketWriterFactory& writer_factory,
292 Perspective perspective, 293 bool owns_writer,
293 bool is_secure, 294 Perspective perspective,
294 const QuicVersionVector& supported_versions); 295 bool is_secure,
296 const QuicVersionVector& supported_versions,
297 scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher);
Ryan Hamilton 2015/09/10 19:32:04 quic_connection.h is shared code with the internal
tbansal1 2015/09/11 19:38:35 Done.
295 ~QuicConnection() override; 298 ~QuicConnection() override;
296 299
297 // Sets connection parameters from the supplied |config|. 300 // Sets connection parameters from the supplied |config|.
298 void SetFromConfig(const QuicConfig& config); 301 void SetFromConfig(const QuicConfig& config);
299 302
300 // Called by the session when sending connection state to the client. 303 // Called by the session when sending connection state to the client.
301 virtual void OnSendConnectionState( 304 virtual void OnSendConnectionState(
302 const CachedNetworkParameters& cached_network_params); 305 const CachedNetworkParameters& cached_network_params);
303 306
304 // Called by the Session when the client has provided CachedNetworkParameters. 307 // Called by the Session when the client has provided CachedNetworkParameters.
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 972
970 // The size of the largest packet received from peer. 973 // The size of the largest packet received from peer.
971 QuicByteCount largest_received_packet_size_; 974 QuicByteCount largest_received_packet_size_;
972 975
973 // Whether a GoAway has been sent. 976 // Whether a GoAway has been sent.
974 bool goaway_sent_; 977 bool goaway_sent_;
975 978
976 // Whether a GoAway has been received. 979 // Whether a GoAway has been received.
977 bool goaway_received_; 980 bool goaway_received_;
978 981
982 // Watches the performance of the UDP socket underlying this QUIC connection.
983 // May be null.
984 const scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher_;
985
979 DISALLOW_COPY_AND_ASSIGN(QuicConnection); 986 DISALLOW_COPY_AND_ASSIGN(QuicConnection);
980 }; 987 };
981 988
982 } // namespace net 989 } // namespace net
983 990
984 #endif // NET_QUIC_QUIC_CONNECTION_H_ 991 #endif // NET_QUIC_QUIC_CONNECTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698