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> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/hash_tables.h" | 13 #include "base/hash_tables.h" |
14 #include "net/quic/quic_crypto_server_stream.h" | 14 #include "net/quic/quic_crypto_server_stream.h" |
15 #include "net/quic/quic_protocol.h" | 15 #include "net/quic/quic_protocol.h" |
16 #include "net/quic/quic_session.h" | 16 #include "net/quic/quic_session.h" |
17 | 17 |
18 namespace net { | 18 namespace net { |
19 | 19 |
20 class QuicConnection; | 20 class QuicConnection; |
21 class ReliableQuicStream; | 21 class ReliableQuicStream; |
22 | 22 |
| 23 namespace tools { |
| 24 |
23 // An interface from the session to the entity owning the session. | 25 // An interface from the session to the entity owning the session. |
24 // This lets the session notify its owner (the Dispatcher) when the connection | 26 // This lets the session notify its owner (the Dispatcher) when the connection |
25 // is closed. | 27 // is closed. |
26 class QuicSessionOwner { | 28 class QuicSessionOwner { |
27 public: | 29 public: |
28 virtual ~QuicSessionOwner() {} | 30 virtual ~QuicSessionOwner() {} |
29 | 31 |
30 virtual void OnConnectionClose(QuicGuid guid, QuicErrorCode error) = 0; | 32 virtual void OnConnectionClose(QuicGuid guid, QuicErrorCode error) = 0; |
31 }; | 33 }; |
32 | 34 |
(...skipping 18 matching lines...) Expand all Loading... |
51 // possibly closing the connection, and returns false. | 53 // possibly closing the connection, and returns false. |
52 virtual bool ShouldCreateIncomingReliableStream(QuicStreamId id); | 54 virtual bool ShouldCreateIncomingReliableStream(QuicStreamId id); |
53 | 55 |
54 private: | 56 private: |
55 QuicCryptoServerStream crypto_stream_; | 57 QuicCryptoServerStream crypto_stream_; |
56 QuicSessionOwner* owner_; | 58 QuicSessionOwner* owner_; |
57 | 59 |
58 DISALLOW_COPY_AND_ASSIGN(QuicServerSession); | 60 DISALLOW_COPY_AND_ASSIGN(QuicServerSession); |
59 }; | 61 }; |
60 | 62 |
| 63 } // namespace tools |
61 } // namespace net | 64 } // namespace net |
62 | 65 |
63 #endif // NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_ | 66 #endif // NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_ |
OLD | NEW |