| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 | 382 |
| 383 size_t NumFecGroups() const { return group_map_.size(); } | 383 size_t NumFecGroups() const { return group_map_.size(); } |
| 384 | 384 |
| 385 // Testing only. | 385 // Testing only. |
| 386 size_t NumQueuedPackets() const { return queued_packets_.size(); } | 386 size_t NumQueuedPackets() const { return queued_packets_.size(); } |
| 387 | 387 |
| 388 QuicEncryptedPacket* ReleaseConnectionClosePacket() { | 388 QuicEncryptedPacket* ReleaseConnectionClosePacket() { |
| 389 return connection_close_packet_.release(); | 389 return connection_close_packet_.release(); |
| 390 } | 390 } |
| 391 | 391 |
| 392 // Flush any queued frames immediately. Preserves the batch write mode and | |
| 393 // does nothing if there are no pending frames. | |
| 394 void Flush(); | |
| 395 | |
| 396 // Returns true if the underlying UDP socket is writable, there is | 392 // Returns true if the underlying UDP socket is writable, there is |
| 397 // no queued data and the connection is not congestion-control | 393 // no queued data and the connection is not congestion-control |
| 398 // blocked. | 394 // blocked. |
| 399 bool CanWriteStreamData(); | 395 bool CanWriteStreamData(); |
| 400 | 396 |
| 401 // Returns true if the connection has queued packets or frames. | 397 // Returns true if the connection has queued packets or frames. |
| 402 bool HasQueuedData() const; | 398 bool HasQueuedData() const; |
| 403 | 399 |
| 404 // Sets (or resets) the idle state connection timeout. Also, checks and times | 400 // Sets (or resets) the idle state connection timeout. Also, checks and times |
| 405 // out the connection if network timer has expired for |timeout|. | 401 // out the connection if network timer has expired for |timeout|. |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 // If non-empty this contains the set of versions received in a | 763 // If non-empty this contains the set of versions received in a |
| 768 // version negotiation packet. | 764 // version negotiation packet. |
| 769 QuicVersionVector server_supported_versions_; | 765 QuicVersionVector server_supported_versions_; |
| 770 | 766 |
| 771 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 767 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
| 772 }; | 768 }; |
| 773 | 769 |
| 774 } // namespace net | 770 } // namespace net |
| 775 | 771 |
| 776 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 772 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
| OLD | NEW |