OLD | NEW |
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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 | 342 |
343 // These two are called by OnAckFrame to update the appropriate internal | 343 // These two are called by OnAckFrame to update the appropriate internal |
344 // state. | 344 // state. |
345 // | 345 // |
346 // Updates internal state based on incoming_ack.received_info | 346 // Updates internal state based on incoming_ack.received_info |
347 void UpdatePacketInformationReceivedByPeer( | 347 void UpdatePacketInformationReceivedByPeer( |
348 const QuicAckFrame& incoming_ack); | 348 const QuicAckFrame& incoming_ack); |
349 // Updates internal state based in incoming_ack.sent_info | 349 // Updates internal state based in incoming_ack.sent_info |
350 void UpdatePacketInformationSentByPeer(const QuicAckFrame& incoming_ack); | 350 void UpdatePacketInformationSentByPeer(const QuicAckFrame& incoming_ack); |
351 | 351 |
352 QuicConnectionHelperInterface* helper() { return helper_; } | 352 QuicConnectionHelperInterface* helper() { return helper_.get(); } |
353 | 353 |
354 private: | 354 private: |
355 friend class test::QuicConnectionPeer; | 355 friend class test::QuicConnectionPeer; |
356 | 356 |
357 // Packets which have not been written to the wire. | 357 // Packets which have not been written to the wire. |
358 // Owns the QuicPacket* packet. | 358 // Owns the QuicPacket* packet. |
359 struct QueuedPacket { | 359 struct QueuedPacket { |
360 QueuedPacket(QuicPacketSequenceNumber sequence_number, | 360 QueuedPacket(QuicPacketSequenceNumber sequence_number, |
361 QuicPacket* packet) | 361 QuicPacket* packet) |
362 : sequence_number(sequence_number), | 362 : sequence_number(sequence_number), |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 void UpdateOutgoingAck(); | 419 void UpdateOutgoingAck(); |
420 | 420 |
421 void MaybeSendAckInResponseToPacket(); | 421 void MaybeSendAckInResponseToPacket(); |
422 | 422 |
423 // Get the FEC group associate with the last processed packet. | 423 // Get the FEC group associate with the last processed packet. |
424 QuicFecGroup* GetFecGroup(); | 424 QuicFecGroup* GetFecGroup(); |
425 | 425 |
426 // Closes any FEC groups protecting packets before |sequence_number|. | 426 // Closes any FEC groups protecting packets before |sequence_number|. |
427 void CloseFecGroupsBefore(QuicPacketSequenceNumber sequence_number); | 427 void CloseFecGroupsBefore(QuicPacketSequenceNumber sequence_number); |
428 | 428 |
429 QuicConnectionHelperInterface* helper_; | 429 scoped_ptr<QuicConnectionHelperInterface> helper_; |
430 QuicFramer framer_; | 430 QuicFramer framer_; |
431 const QuicClock* clock_; | 431 const QuicClock* clock_; |
432 QuicRandom* random_generator_; | 432 QuicRandom* random_generator_; |
433 | 433 |
434 const QuicGuid guid_; | 434 const QuicGuid guid_; |
435 // Address on the last successfully processed packet received from the | 435 // Address on the last successfully processed packet received from the |
436 // client. | 436 // client. |
437 IPEndPoint self_address_; | 437 IPEndPoint self_address_; |
438 IPEndPoint peer_address_; | 438 IPEndPoint peer_address_; |
439 // Address on the last(currently being processed) packet received. Not | 439 // Address on the last(currently being processed) packet received. Not |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 bool received_truncated_ack_; | 519 bool received_truncated_ack_; |
520 | 520 |
521 bool send_ack_in_response_to_packet_; | 521 bool send_ack_in_response_to_packet_; |
522 | 522 |
523 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 523 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
524 }; | 524 }; |
525 | 525 |
526 } // namespace net | 526 } // namespace net |
527 | 527 |
528 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 528 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
OLD | NEW |