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

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

Issue 12545035: Refactor QuicClientSession so that it owns the underlying socket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test leak Created 7 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_client_session.cc ('k') | net/quic/quic_connection_helper.h » ('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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 // These two are called by OnAckFrame to update the appropriate internal 365 // These two are called by OnAckFrame to update the appropriate internal
366 // state. 366 // state.
367 // 367 //
368 // Updates internal state based on incoming_ack.received_info 368 // Updates internal state based on incoming_ack.received_info
369 void UpdatePacketInformationReceivedByPeer( 369 void UpdatePacketInformationReceivedByPeer(
370 const QuicAckFrame& incoming_ack); 370 const QuicAckFrame& incoming_ack);
371 // Updates internal state based in incoming_ack.sent_info 371 // Updates internal state based in incoming_ack.sent_info
372 void UpdatePacketInformationSentByPeer(const QuicAckFrame& incoming_ack); 372 void UpdatePacketInformationSentByPeer(const QuicAckFrame& incoming_ack);
373 373
374 QuicConnectionHelperInterface* helper() { return helper_; } 374 QuicConnectionHelperInterface* helper() { return helper_.get(); }
375 375
376 private: 376 private:
377 friend class test::QuicConnectionPeer; 377 friend class test::QuicConnectionPeer;
378 378
379 // Packets which have not been written to the wire. 379 // Packets which have not been written to the wire.
380 // Owns the QuicPacket* packet. 380 // Owns the QuicPacket* packet.
381 struct QueuedPacket { 381 struct QueuedPacket {
382 QueuedPacket(QuicPacketSequenceNumber sequence_number, 382 QueuedPacket(QuicPacketSequenceNumber sequence_number,
383 QuicPacket* packet, 383 QuicPacket* packet,
384 bool has_retransmittable_data) 384 bool has_retransmittable_data)
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 void UpdateOutgoingAck(); 454 void UpdateOutgoingAck();
455 455
456 void MaybeSendAckInResponseToPacket(); 456 void MaybeSendAckInResponseToPacket();
457 457
458 // Get the FEC group associate with the last processed packet. 458 // Get the FEC group associate with the last processed packet.
459 QuicFecGroup* GetFecGroup(); 459 QuicFecGroup* GetFecGroup();
460 460
461 // Closes any FEC groups protecting packets before |sequence_number|. 461 // Closes any FEC groups protecting packets before |sequence_number|.
462 void CloseFecGroupsBefore(QuicPacketSequenceNumber sequence_number); 462 void CloseFecGroupsBefore(QuicPacketSequenceNumber sequence_number);
463 463
464 QuicConnectionHelperInterface* helper_; 464 scoped_ptr<QuicConnectionHelperInterface> helper_;
465 QuicFramer framer_; 465 QuicFramer framer_;
466 const QuicClock* clock_; 466 const QuicClock* clock_;
467 QuicRandom* random_generator_; 467 QuicRandom* random_generator_;
468 468
469 const QuicGuid guid_; 469 const QuicGuid guid_;
470 // Address on the last successfully processed packet received from the 470 // Address on the last successfully processed packet received from the
471 // client. 471 // client.
472 IPEndPoint self_address_; 472 IPEndPoint self_address_;
473 IPEndPoint peer_address_; 473 IPEndPoint peer_address_;
474 // Address on the last(currently being processed) packet received. Not 474 // Address on the last(currently being processed) packet received. Not
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 bool received_truncated_ack_; 566 bool received_truncated_ack_;
567 567
568 bool send_ack_in_response_to_packet_; 568 bool send_ack_in_response_to_packet_;
569 569
570 DISALLOW_COPY_AND_ASSIGN(QuicConnection); 570 DISALLOW_COPY_AND_ASSIGN(QuicConnection);
571 }; 571 };
572 572
573 } // namespace net 573 } // namespace net
574 574
575 #endif // NET_QUIC_QUIC_CONNECTION_H_ 575 #endif // NET_QUIC_QUIC_CONNECTION_H_
OLDNEW
« no previous file with comments | « net/quic/quic_client_session.cc ('k') | net/quic/quic_connection_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698