| 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 <vector> | 10 #include <vector> |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // Clients will call this function in the order: | 99 // Clients will call this function in the order: |
| 100 // ENCRYPTION_FIRST_ESTABLISHED | 100 // ENCRYPTION_FIRST_ESTABLISHED |
| 101 // zero or more ENCRYPTION_REESTABLISHED | 101 // zero or more ENCRYPTION_REESTABLISHED |
| 102 // HANDSHAKE_CONFIRMED | 102 // HANDSHAKE_CONFIRMED |
| 103 // | 103 // |
| 104 // Servers will simply call it once with HANDSHAKE_CONFIRMED. | 104 // Servers will simply call it once with HANDSHAKE_CONFIRMED. |
| 105 virtual void OnCryptoHandshakeEvent(CryptoHandshakeEvent event); | 105 virtual void OnCryptoHandshakeEvent(CryptoHandshakeEvent event); |
| 106 | 106 |
| 107 // Returns mutable config for this session. Returned config is owned | 107 // Returns mutable config for this session. Returned config is owned |
| 108 // by QuicSession. | 108 // by QuicSession. |
| 109 virtual QuicConfig* config(); | 109 QuicConfig* config(); |
| 110 | 110 |
| 111 // Returns true if the stream existed previously and has been closed. | 111 // Returns true if the stream existed previously and has been closed. |
| 112 // Returns false if the stream is still active or if the stream has | 112 // Returns false if the stream is still active or if the stream has |
| 113 // not yet been created. | 113 // not yet been created. |
| 114 bool IsClosedStream(QuicStreamId id); | 114 bool IsClosedStream(QuicStreamId id); |
| 115 | 115 |
| 116 QuicConnection* connection() { return connection_.get(); } | 116 QuicConnection* connection() { return connection_.get(); } |
| 117 size_t num_active_requests() const { return stream_map_.size(); } | 117 size_t num_active_requests() const { return stream_map_.size(); } |
| 118 const IPEndPoint& peer_address() const { | 118 const IPEndPoint& peer_address() const { |
| 119 return connection_->peer_address(); | 119 return connection_->peer_address(); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 bool goaway_received_; | 232 bool goaway_received_; |
| 233 // Whether a GoAway has been sent. | 233 // Whether a GoAway has been sent. |
| 234 bool goaway_sent_; | 234 bool goaway_sent_; |
| 235 | 235 |
| 236 DISALLOW_COPY_AND_ASSIGN(QuicSession); | 236 DISALLOW_COPY_AND_ASSIGN(QuicSession); |
| 237 }; | 237 }; |
| 238 | 238 |
| 239 } // namespace net | 239 } // namespace net |
| 240 | 240 |
| 241 #endif // NET_QUIC_QUIC_SESSION_H_ | 241 #endif // NET_QUIC_QUIC_SESSION_H_ |
| OLD | NEW |