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 <map> | 10 #include <map> |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // the server and thus the encryption key has been updated. Therefore the | 46 // the server and thus the encryption key has been updated. Therefore the |
47 // connection should resend any packets that were sent under | 47 // connection should resend any packets that were sent under |
48 // ENCRYPTION_INITIAL. (Client only.) | 48 // ENCRYPTION_INITIAL. (Client only.) |
49 ENCRYPTION_REESTABLISHED, | 49 ENCRYPTION_REESTABLISHED, |
50 // HANDSHAKE_CONFIRMED, in a client, indicates the the server has accepted | 50 // HANDSHAKE_CONFIRMED, in a client, indicates the the server has accepted |
51 // our handshake. In a server it indicates that a full, valid client hello | 51 // our handshake. In a server it indicates that a full, valid client hello |
52 // has been received. (Client and server.) | 52 // has been received. (Client and server.) |
53 HANDSHAKE_CONFIRMED, | 53 HANDSHAKE_CONFIRMED, |
54 }; | 54 }; |
55 | 55 |
| 56 // Takes ownership of |connection|. |
56 QuicSession(QuicConnection* connection, const QuicConfig& config); | 57 QuicSession(QuicConnection* connection, const QuicConfig& config); |
57 | 58 |
58 ~QuicSession() override; | 59 ~QuicSession() override; |
59 | 60 |
60 virtual void Initialize(); | 61 virtual void Initialize(); |
61 | 62 |
62 // QuicConnectionVisitorInterface methods: | 63 // QuicConnectionVisitorInterface methods: |
63 void OnStreamFrame(const QuicStreamFrame& frame) override; | 64 void OnStreamFrame(const QuicStreamFrame& frame) override; |
64 void OnRstStream(const QuicRstStreamFrame& frame) override; | 65 void OnRstStream(const QuicRstStreamFrame& frame) override; |
65 void OnGoAway(const QuicGoAwayFrame& frame) override; | 66 void OnGoAway(const QuicGoAwayFrame& frame) override; |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 | 335 |
335 // Indicate if there is pending data for the crypto stream. | 336 // Indicate if there is pending data for the crypto stream. |
336 bool has_pending_handshake_; | 337 bool has_pending_handshake_; |
337 | 338 |
338 DISALLOW_COPY_AND_ASSIGN(QuicSession); | 339 DISALLOW_COPY_AND_ASSIGN(QuicSession); |
339 }; | 340 }; |
340 | 341 |
341 } // namespace net | 342 } // namespace net |
342 | 343 |
343 #endif // NET_QUIC_QUIC_SESSION_H_ | 344 #endif // NET_QUIC_QUIC_SESSION_H_ |
OLD | NEW |