| 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 // its FEC group that packet will be revived and processed. | 310 // its FEC group that packet will be revived and processed. |
| 311 virtual void ProcessUdpPacket(const IPEndPoint& self_address, | 311 virtual void ProcessUdpPacket(const IPEndPoint& self_address, |
| 312 const IPEndPoint& peer_address, | 312 const IPEndPoint& peer_address, |
| 313 const QuicEncryptedPacket& packet); | 313 const QuicEncryptedPacket& packet); |
| 314 | 314 |
| 315 // QuicBlockedWriterInterface | 315 // QuicBlockedWriterInterface |
| 316 // Called when the underlying connection becomes writable to allow queued | 316 // Called when the underlying connection becomes writable to allow queued |
| 317 // writes to happen. | 317 // writes to happen. |
| 318 virtual void OnCanWrite() OVERRIDE; | 318 virtual void OnCanWrite() OVERRIDE; |
| 319 | 319 |
| 320 // Called when a packet has been finally sent to the network. | 320 // Called when an error occurs while attempting to write a packet to the |
| 321 bool OnPacketSent(WriteResult result); | 321 // network. |
| 322 void OnWriteError(int error_code); |
| 322 | 323 |
| 323 // If the socket is not blocked, writes queued packets. | 324 // If the socket is not blocked, writes queued packets. |
| 324 void WriteIfNotBlocked(); | 325 void WriteIfNotBlocked(); |
| 325 | 326 |
| 326 // The version of the protocol this connection is using. | 327 // The version of the protocol this connection is using. |
| 327 QuicVersion version() const { return framer_.version(); } | 328 QuicVersion version() const { return framer_.version(); } |
| 328 | 329 |
| 329 // The versions of the protocol that this connection supports. | 330 // The versions of the protocol that this connection supports. |
| 330 const QuicVersionVector& supported_versions() const { | 331 const QuicVersionVector& supported_versions() const { |
| 331 return framer_.supported_versions(); | 332 return framer_.supported_versions(); |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 // If non-empty this contains the set of versions received in a | 798 // If non-empty this contains the set of versions received in a |
| 798 // version negotiation packet. | 799 // version negotiation packet. |
| 799 QuicVersionVector server_supported_versions_; | 800 QuicVersionVector server_supported_versions_; |
| 800 | 801 |
| 801 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 802 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
| 802 }; | 803 }; |
| 803 | 804 |
| 804 } // namespace net | 805 } // namespace net |
| 805 | 806 |
| 806 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 807 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
| OLD | NEW |