| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 155 } |
| 156 | 156 |
| 157 QuicSpdyDecompressor* decompressor() { return &decompressor_; } | 157 QuicSpdyDecompressor* decompressor() { return &decompressor_; } |
| 158 QuicSpdyCompressor* compressor() { return &compressor_; } | 158 QuicSpdyCompressor* compressor() { return &compressor_; } |
| 159 | 159 |
| 160 // Gets the SSL connection information. | 160 // Gets the SSL connection information. |
| 161 virtual bool GetSSLInfo(SSLInfo* ssl_info); | 161 virtual bool GetSSLInfo(SSLInfo* ssl_info); |
| 162 | 162 |
| 163 QuicErrorCode error() const { return error_; } | 163 QuicErrorCode error() const { return error_; } |
| 164 | 164 |
| 165 bool is_server() const { return is_server_; } |
| 166 |
| 165 protected: | 167 protected: |
| 166 // Creates a new stream, owned by the caller, to handle a peer-initiated | 168 // Creates a new stream, owned by the caller, to handle a peer-initiated |
| 167 // stream. Returns NULL and does error handling if the stream can not be | 169 // stream. Returns NULL and does error handling if the stream can not be |
| 168 // created. | 170 // created. |
| 169 virtual ReliableQuicStream* CreateIncomingReliableStream(QuicStreamId id) = 0; | 171 virtual ReliableQuicStream* CreateIncomingReliableStream(QuicStreamId id) = 0; |
| 170 | 172 |
| 171 // Create a new stream, owned by the caller, to handle a locally-initiated | 173 // Create a new stream, owned by the caller, to handle a locally-initiated |
| 172 // stream. Returns NULL if max streams have already been opened. | 174 // stream. Returns NULL if max streams have already been opened. |
| 173 virtual ReliableQuicStream* CreateOutgoingReliableStream() = 0; | 175 virtual ReliableQuicStream* CreateOutgoingReliableStream() = 0; |
| 174 | 176 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 | 288 |
| 287 // Indicate if there is pending data for the crypto stream. | 289 // Indicate if there is pending data for the crypto stream. |
| 288 bool has_pending_handshake_; | 290 bool has_pending_handshake_; |
| 289 | 291 |
| 290 DISALLOW_COPY_AND_ASSIGN(QuicSession); | 292 DISALLOW_COPY_AND_ASSIGN(QuicSession); |
| 291 }; | 293 }; |
| 292 | 294 |
| 293 } // namespace net | 295 } // namespace net |
| 294 | 296 |
| 295 #endif // NET_QUIC_QUIC_SESSION_H_ | 297 #endif // NET_QUIC_QUIC_SESSION_H_ |
| OLD | NEW |