| 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 server specific QuicSession subclass. | 5 // A server specific QuicSession subclass. |
| 6 | 6 |
| 7 #ifndef NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_ | 7 #ifndef NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_ |
| 8 #define NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_ | 8 #define NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_ |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 public: | 39 public: |
| 40 QuicServerSession(const QuicConfig& config, | 40 QuicServerSession(const QuicConfig& config, |
| 41 QuicConnection *connection, | 41 QuicConnection *connection, |
| 42 QuicSessionOwner* owner); | 42 QuicSessionOwner* owner); |
| 43 | 43 |
| 44 // Override the base class to notify the owner of the connection close. | 44 // Override the base class to notify the owner of the connection close. |
| 45 virtual void ConnectionClose(QuicErrorCode error, bool from_peer) OVERRIDE; | 45 virtual void ConnectionClose(QuicErrorCode error, bool from_peer) OVERRIDE; |
| 46 | 46 |
| 47 virtual ~QuicServerSession(); | 47 virtual ~QuicServerSession(); |
| 48 | 48 |
| 49 virtual void InitializeSession(const QuicCryptoServerConfig& crypto_config); | 49 virtual void Initialize(const QuicCryptoServerConfig& crypto_config); |
| 50 | 50 |
| 51 protected: | 51 protected: |
| 52 // QuicSession methods: | 52 // QuicSession methods: |
| 53 virtual ReliableQuicStream* CreateIncomingReliableStream( | 53 virtual ReliableQuicStream* CreateIncomingReliableStream( |
| 54 QuicStreamId id) OVERRIDE; | 54 QuicStreamId id) OVERRIDE; |
| 55 virtual ReliableQuicStream* CreateOutgoingReliableStream() OVERRIDE; | 55 virtual ReliableQuicStream* CreateOutgoingReliableStream() OVERRIDE; |
| 56 virtual QuicCryptoServerStream* GetCryptoStream() OVERRIDE; | 56 virtual QuicCryptoServerStream* GetCryptoStream() OVERRIDE; |
| 57 | 57 |
| 58 // If we should create an incoming stream, returns true. Otherwise | 58 // If we should create an incoming stream, returns true. Otherwise |
| 59 // does error handling, including communicating the error to the client and | 59 // does error handling, including communicating the error to the client and |
| 60 // possibly closing the connection, and returns false. | 60 // possibly closing the connection, and returns false. |
| 61 virtual bool ShouldCreateIncomingReliableStream(QuicStreamId id); | 61 virtual bool ShouldCreateIncomingReliableStream(QuicStreamId id); |
| 62 | 62 |
| 63 virtual QuicCryptoServerStream* CreateQuicCryptoServerStream( | 63 virtual QuicCryptoServerStream* CreateQuicCryptoServerStream( |
| 64 const QuicCryptoServerConfig& crypto_config); | 64 const QuicCryptoServerConfig& crypto_config); |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 scoped_ptr<QuicCryptoServerStream> crypto_stream_; | 67 scoped_ptr<QuicCryptoServerStream> crypto_stream_; |
| 68 QuicSessionOwner* owner_; | 68 QuicSessionOwner* owner_; |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(QuicServerSession); | 70 DISALLOW_COPY_AND_ASSIGN(QuicServerSession); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace tools | 73 } // namespace tools |
| 74 } // namespace net | 74 } // namespace net |
| 75 | 75 |
| 76 #endif // NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_ | 76 #endif // NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_ |
| OLD | NEW |