| 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 19 matching lines...) Expand all Loading... |
| 30 #include "base/logging.h" | 30 #include "base/logging.h" |
| 31 #include "base/macros.h" | 31 #include "base/macros.h" |
| 32 #include "base/strings/string_piece.h" | 32 #include "base/strings/string_piece.h" |
| 33 #include "net/base/ip_address.h" | 33 #include "net/base/ip_address.h" |
| 34 #include "net/base/ip_endpoint.h" | 34 #include "net/base/ip_endpoint.h" |
| 35 #include "net/quic/crypto/quic_decrypter.h" | 35 #include "net/quic/crypto/quic_decrypter.h" |
| 36 #include "net/quic/quic_alarm.h" | 36 #include "net/quic/quic_alarm.h" |
| 37 #include "net/quic/quic_alarm_factory.h" | 37 #include "net/quic/quic_alarm_factory.h" |
| 38 #include "net/quic/quic_blocked_writer_interface.h" | 38 #include "net/quic/quic_blocked_writer_interface.h" |
| 39 #include "net/quic/quic_framer.h" | 39 #include "net/quic/quic_framer.h" |
| 40 #include "net/quic/quic_connection_stats.h" |
| 41 #include "net/quic/quic_multipath_sent_packet_manager.h" |
| 40 #include "net/quic/quic_one_block_arena.h" | 42 #include "net/quic/quic_one_block_arena.h" |
| 41 #include "net/quic/quic_packet_creator.h" | 43 #include "net/quic/quic_packet_creator.h" |
| 42 #include "net/quic/quic_packet_generator.h" | 44 #include "net/quic/quic_packet_generator.h" |
| 43 #include "net/quic/quic_packet_writer.h" | 45 #include "net/quic/quic_packet_writer.h" |
| 44 #include "net/quic/quic_protocol.h" | 46 #include "net/quic/quic_protocol.h" |
| 45 #include "net/quic/quic_received_packet_manager.h" | 47 #include "net/quic/quic_received_packet_manager.h" |
| 46 #include "net/quic/quic_sent_entropy_manager.h" | 48 #include "net/quic/quic_sent_entropy_manager.h" |
| 47 #include "net/quic/quic_sent_packet_manager_interface.h" | 49 #include "net/quic/quic_sent_packet_manager_interface.h" |
| 48 #include "net/quic/quic_time.h" | 50 #include "net/quic/quic_time.h" |
| 49 #include "net/quic/quic_types.h" | 51 #include "net/quic/quic_types.h" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 virtual QuicRandom* GetRandomGenerator() = 0; | 280 virtual QuicRandom* GetRandomGenerator() = 0; |
| 279 | 281 |
| 280 // Returns a QuicBufferAllocator to be used for all stream frame buffers. | 282 // Returns a QuicBufferAllocator to be used for all stream frame buffers. |
| 281 virtual QuicBufferAllocator* GetBufferAllocator() = 0; | 283 virtual QuicBufferAllocator* GetBufferAllocator() = 0; |
| 282 }; | 284 }; |
| 283 | 285 |
| 284 class NET_EXPORT_PRIVATE QuicConnection | 286 class NET_EXPORT_PRIVATE QuicConnection |
| 285 : public QuicFramerVisitorInterface, | 287 : public QuicFramerVisitorInterface, |
| 286 public QuicBlockedWriterInterface, | 288 public QuicBlockedWriterInterface, |
| 287 public QuicPacketGenerator::DelegateInterface, | 289 public QuicPacketGenerator::DelegateInterface, |
| 288 public QuicSentPacketManager::NetworkChangeVisitor { | 290 public QuicSentPacketManagerInterface::NetworkChangeVisitor { |
| 289 public: | 291 public: |
| 290 enum AckBundling { | 292 enum AckBundling { |
| 291 // Send an ack if it's already queued in the connection. | 293 // Send an ack if it's already queued in the connection. |
| 292 SEND_ACK_IF_QUEUED, | 294 SEND_ACK_IF_QUEUED, |
| 293 // Always send an ack. | 295 // Always send an ack. |
| 294 SEND_ACK, | 296 SEND_ACK, |
| 295 // Bundle an ack with outgoing data. | 297 // Bundle an ack with outgoing data. |
| 296 SEND_ACK_IF_PENDING, | 298 SEND_ACK_IF_PENDING, |
| 297 }; | 299 }; |
| 298 | 300 |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 | 1071 |
| 1070 // If true, multipath is enabled for this connection. | 1072 // If true, multipath is enabled for this connection. |
| 1071 bool multipath_enabled_; | 1073 bool multipath_enabled_; |
| 1072 | 1074 |
| 1073 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 1075 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
| 1074 }; | 1076 }; |
| 1075 | 1077 |
| 1076 } // namespace net | 1078 } // namespace net |
| 1077 | 1079 |
| 1078 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 1080 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
| OLD | NEW |