| 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 // A QuicSession, which demuxes a single connection to individual streams. | 5 // A QuicSession, which demuxes a single connection to individual streams. |
| 6 | 6 |
| 7 #ifndef NET_QUIC_QUIC_SESSION_H_ | 7 #ifndef NET_QUIC_QUIC_SESSION_H_ |
| 8 #define NET_QUIC_QUIC_SESSION_H_ | 8 #define NET_QUIC_QUIC_SESSION_H_ |
| 9 | 9 |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 void OnSuccessfulVersionNegotiation(const QuicVersion& version) override; | 73 void OnSuccessfulVersionNegotiation(const QuicVersion& version) override; |
| 74 void OnCanWrite() override; | 74 void OnCanWrite() override; |
| 75 void OnCongestionWindowChange(QuicTime /*now*/) override {} | 75 void OnCongestionWindowChange(QuicTime /*now*/) override {} |
| 76 void OnConnectionMigration() override {} | 76 void OnConnectionMigration() override {} |
| 77 // Deletes streams that are safe to be deleted now that it's safe to do so (no | 77 // Deletes streams that are safe to be deleted now that it's safe to do so (no |
| 78 // other operations are being done on the streams at this time). | 78 // other operations are being done on the streams at this time). |
| 79 void PostProcessAfterData() override; | 79 void PostProcessAfterData() override; |
| 80 bool WillingAndAbleToWrite() const override; | 80 bool WillingAndAbleToWrite() const override; |
| 81 bool HasPendingHandshake() const override; | 81 bool HasPendingHandshake() const override; |
| 82 bool HasOpenDynamicStreams() const override; | 82 bool HasOpenDynamicStreams() const override; |
| 83 void OnPathDegrading() override; |
| 83 | 84 |
| 84 // Called on every incoming packet. Passes |packet| through to |connection_|. | 85 // Called on every incoming packet. Passes |packet| through to |connection_|. |
| 85 virtual void ProcessUdpPacket(const IPEndPoint& self_address, | 86 virtual void ProcessUdpPacket(const IPEndPoint& self_address, |
| 86 const IPEndPoint& peer_address, | 87 const IPEndPoint& peer_address, |
| 87 const QuicEncryptedPacket& packet); | 88 const QuicEncryptedPacket& packet); |
| 88 | 89 |
| 89 // Called by streams when they want to write data to the peer. | 90 // Called by streams when they want to write data to the peer. |
| 90 // Returns a pair with the number of bytes consumed from data, and a boolean | 91 // Returns a pair with the number of bytes consumed from data, and a boolean |
| 91 // indicating if the fin bit was consumed. This does not indicate the data | 92 // indicating if the fin bit was consumed. This does not indicate the data |
| 92 // has been sent on the wire: it may have been turned into a packet and queued | 93 // has been sent on the wire: it may have been turned into a packet and queued |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 // The stream id which was last popped in OnCanWrite, or 0, if not under the | 405 // The stream id which was last popped in OnCanWrite, or 0, if not under the |
| 405 // call stack of OnCanWrite. | 406 // call stack of OnCanWrite. |
| 406 QuicStreamId currently_writing_stream_id_; | 407 QuicStreamId currently_writing_stream_id_; |
| 407 | 408 |
| 408 DISALLOW_COPY_AND_ASSIGN(QuicSession); | 409 DISALLOW_COPY_AND_ASSIGN(QuicSession); |
| 409 }; | 410 }; |
| 410 | 411 |
| 411 } // namespace net | 412 } // namespace net |
| 412 | 413 |
| 413 #endif // NET_QUIC_QUIC_SESSION_H_ | 414 #endif // NET_QUIC_QUIC_SESSION_H_ |
| OLD | NEW |