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

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

Issue 1014433002: Land Recent QUIC Changes until 03/09/2015. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replaces_Perspective_enun_88006458
Patch Set: Rebase - added NET_EXPORT_PRIVATE to fix compiler error Created 5 years, 9 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
« no previous file with comments | « net/quic/quic_config.cc ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // Called after a packet has been successfully parsed which results 194 // Called after a packet has been successfully parsed which results
195 // in the revival of a packet via FEC. 195 // in the revival of a packet via FEC.
196 virtual void OnRevivedPacket(const QuicPacketHeader& revived_header, 196 virtual void OnRevivedPacket(const QuicPacketHeader& revived_header,
197 base::StringPiece payload) {} 197 base::StringPiece payload) {}
198 198
199 // Called when the connection is closed. 199 // Called when the connection is closed.
200 virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) {} 200 virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) {}
201 201
202 // Called when the version negotiation is successful. 202 // Called when the version negotiation is successful.
203 virtual void OnSuccessfulVersionNegotiation(const QuicVersion& version) {} 203 virtual void OnSuccessfulVersionNegotiation(const QuicVersion& version) {}
204
205 // Called when a CachedNetworkParameters is sent to the client.
206 virtual void OnSendConnectionState(
207 const CachedNetworkParameters& cached_network_params) {}
208
209 // Called when resuming previous connection state.
210 virtual void OnResumeConnectionState(
211 const CachedNetworkParameters& cached_network_params) {}
204 }; 212 };
205 213
206 class NET_EXPORT_PRIVATE QuicConnectionHelperInterface { 214 class NET_EXPORT_PRIVATE QuicConnectionHelperInterface {
207 public: 215 public:
208 virtual ~QuicConnectionHelperInterface() {} 216 virtual ~QuicConnectionHelperInterface() {}
209 217
210 // Returns a QuicClock to be used for all time related functions. 218 // Returns a QuicClock to be used for all time related functions.
211 virtual const QuicClock* GetClock() const = 0; 219 virtual const QuicClock* GetClock() const = 0;
212 220
213 // Returns a QuicRandom to be used for all random number related functions. 221 // Returns a QuicRandom to be used for all random number related functions.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 const PacketWriterFactory& writer_factory, 256 const PacketWriterFactory& writer_factory,
249 bool owns_writer, 257 bool owns_writer,
250 Perspective perspective, 258 Perspective perspective,
251 bool is_secure, 259 bool is_secure,
252 const QuicVersionVector& supported_versions); 260 const QuicVersionVector& supported_versions);
253 ~QuicConnection() override; 261 ~QuicConnection() override;
254 262
255 // Sets connection parameters from the supplied |config|. 263 // Sets connection parameters from the supplied |config|.
256 void SetFromConfig(const QuicConfig& config); 264 void SetFromConfig(const QuicConfig& config);
257 265
266 // Called by the session when sending connection state to the client.
267 virtual void OnSendConnectionState(
268 const CachedNetworkParameters& cached_network_params);
269
258 // Called by the Session when the client has provided CachedNetworkParameters. 270 // Called by the Session when the client has provided CachedNetworkParameters.
259 // Returns true if this changes the initial connection state. 271 // Returns true if this changes the initial connection state.
260 virtual bool ResumeConnectionState( 272 virtual bool ResumeConnectionState(
261 const CachedNetworkParameters& cached_network_params); 273 const CachedNetworkParameters& cached_network_params);
262 274
263 // Sets the number of active streams on the connection for congestion control. 275 // Sets the number of active streams on the connection for congestion control.
264 void SetNumOpenStreams(size_t num_streams); 276 void SetNumOpenStreams(size_t num_streams);
265 277
266 // Send the data in |data| to the peer in as few packets as possible. 278 // Send the data in |data| to the peer in as few packets as possible.
267 // Returns a pair with the number of bytes consumed from data, and a boolean 279 // Returns a pair with the number of bytes consumed from data, and a boolean
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 849
838 // True if this is a secure QUIC connection. 850 // True if this is a secure QUIC connection.
839 bool is_secure_; 851 bool is_secure_;
840 852
841 DISALLOW_COPY_AND_ASSIGN(QuicConnection); 853 DISALLOW_COPY_AND_ASSIGN(QuicConnection);
842 }; 854 };
843 855
844 } // namespace net 856 } // namespace net
845 857
846 #endif // NET_QUIC_QUIC_CONNECTION_H_ 858 #endif // NET_QUIC_QUIC_CONNECTION_H_
OLDNEW
« no previous file with comments | « net/quic/quic_config.cc ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698