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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 virtual void SendGoAway(QuicErrorCode error, | 322 virtual void SendGoAway(QuicErrorCode error, |
323 QuicStreamId last_good_stream_id, | 323 QuicStreamId last_good_stream_id, |
324 const std::string& reason); | 324 const std::string& reason); |
325 | 325 |
326 // Returns statistics tracked for this connection. | 326 // Returns statistics tracked for this connection. |
327 const QuicConnectionStats& GetStats(); | 327 const QuicConnectionStats& GetStats(); |
328 | 328 |
329 // Processes an incoming UDP packet (consisting of a QuicEncryptedPacket) from | 329 // Processes an incoming UDP packet (consisting of a QuicEncryptedPacket) from |
330 // the peer. If processing this packet permits a packet to be revived from | 330 // the peer. If processing this packet permits a packet to be revived from |
331 // its FEC group that packet will be revived and processed. | 331 // its FEC group that packet will be revived and processed. |
| 332 // In a client, the packet may be "stray" and have a different connection ID |
| 333 // than that of this connection. |
332 virtual void ProcessUdpPacket(const IPEndPoint& self_address, | 334 virtual void ProcessUdpPacket(const IPEndPoint& self_address, |
333 const IPEndPoint& peer_address, | 335 const IPEndPoint& peer_address, |
334 const QuicEncryptedPacket& packet); | 336 const QuicEncryptedPacket& packet); |
335 | 337 |
336 // QuicBlockedWriterInterface | 338 // QuicBlockedWriterInterface |
337 // Called when the underlying connection becomes writable to allow queued | 339 // Called when the underlying connection becomes writable to allow queued |
338 // writes to happen. | 340 // writes to happen. |
339 void OnCanWrite() override; | 341 void OnCanWrite() override; |
340 | 342 |
341 // Called when an error occurs while attempting to write a packet to the | 343 // Called when an error occurs while attempting to write a packet to the |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 | 852 |
851 // True if this is a secure QUIC connection. | 853 // True if this is a secure QUIC connection. |
852 bool is_secure_; | 854 bool is_secure_; |
853 | 855 |
854 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 856 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
855 }; | 857 }; |
856 | 858 |
857 } // namespace net | 859 } // namespace net |
858 | 860 |
859 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 861 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
OLD | NEW |