OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_QUIC_QUIC_SERVER_SESSION_H_ | 7 #ifndef NET_QUIC_QUIC_SERVER_SESSION_H_ |
8 #define NET_QUIC_QUIC_SERVER_SESSION_H_ | 8 #define NET_QUIC_QUIC_SERVER_SESSION_H_ |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 virtual void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) = 0; | 42 virtual void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) = 0; |
43 }; | 43 }; |
44 | 44 |
45 class QuicServerSession : public QuicSession { | 45 class QuicServerSession : public QuicSession { |
46 public: | 46 public: |
47 QuicServerSession(const QuicConfig& config, | 47 QuicServerSession(const QuicConfig& config, |
48 QuicConnection* connection, | 48 QuicConnection* connection, |
49 QuicServerSessionVisitor* visitor); | 49 QuicServerSessionVisitor* visitor); |
50 | 50 |
51 // Override the base class to notify the owner of the connection close. | 51 // Override the base class to notify the owner of the connection close. |
52 virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) OVERRIDE; | 52 virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) override; |
53 virtual void OnWriteBlocked() OVERRIDE; | 53 virtual void OnWriteBlocked() override; |
54 | 54 |
55 // Sends a server config update to the client, containing new bandwidth | 55 // Sends a server config update to the client, containing new bandwidth |
56 // estimate. | 56 // estimate. |
57 virtual void OnCongestionWindowChange(QuicTime now) OVERRIDE; | 57 virtual void OnCongestionWindowChange(QuicTime now) override; |
58 | 58 |
59 virtual ~QuicServerSession(); | 59 virtual ~QuicServerSession(); |
60 | 60 |
61 virtual void InitializeSession(const QuicCryptoServerConfig& crypto_config); | 61 virtual void InitializeSession(const QuicCryptoServerConfig& crypto_config); |
62 | 62 |
63 const QuicCryptoServerStream* crypto_stream() const { | 63 const QuicCryptoServerStream* crypto_stream() const { |
64 return crypto_stream_.get(); | 64 return crypto_stream_.get(); |
65 } | 65 } |
66 | 66 |
67 // Override base class to process FEC config received from client. | 67 // Override base class to process FEC config received from client. |
68 virtual void OnConfigNegotiated() OVERRIDE; | 68 virtual void OnConfigNegotiated() override; |
69 | 69 |
70 void set_serving_region(string serving_region) { | 70 void set_serving_region(string serving_region) { |
71 serving_region_ = serving_region; | 71 serving_region_ = serving_region; |
72 } | 72 } |
73 | 73 |
74 protected: | 74 protected: |
75 // QuicSession methods: | 75 // QuicSession methods: |
76 virtual QuicDataStream* CreateIncomingDataStream(QuicStreamId id) OVERRIDE; | 76 virtual QuicDataStream* CreateIncomingDataStream(QuicStreamId id) override; |
77 virtual QuicDataStream* CreateOutgoingDataStream() OVERRIDE; | 77 virtual QuicDataStream* CreateOutgoingDataStream() override; |
78 virtual QuicCryptoServerStream* GetCryptoStream() OVERRIDE; | 78 virtual QuicCryptoServerStream* GetCryptoStream() override; |
79 | 79 |
80 // If we should create an incoming stream, returns true. Otherwise | 80 // If we should create an incoming stream, returns true. Otherwise |
81 // does error handling, including communicating the error to the client and | 81 // does error handling, including communicating the error to the client and |
82 // possibly closing the connection, and returns false. | 82 // possibly closing the connection, and returns false. |
83 virtual bool ShouldCreateIncomingDataStream(QuicStreamId id); | 83 virtual bool ShouldCreateIncomingDataStream(QuicStreamId id); |
84 | 84 |
85 virtual QuicCryptoServerStream* CreateQuicCryptoServerStream( | 85 virtual QuicCryptoServerStream* CreateQuicCryptoServerStream( |
86 const QuicCryptoServerConfig& crypto_config); | 86 const QuicCryptoServerConfig& crypto_config); |
87 | 87 |
88 private: | 88 private: |
(...skipping 11 matching lines...) Expand all Loading... |
100 | 100 |
101 // Time at which we send the last SCUP to the client. | 101 // Time at which we send the last SCUP to the client. |
102 QuicTime last_server_config_update_time_; | 102 QuicTime last_server_config_update_time_; |
103 | 103 |
104 DISALLOW_COPY_AND_ASSIGN(QuicServerSession); | 104 DISALLOW_COPY_AND_ASSIGN(QuicServerSession); |
105 }; | 105 }; |
106 | 106 |
107 } // namespace net | 107 } // namespace net |
108 | 108 |
109 #endif // NET_QUIC_QUIC_SERVER_SESSION_H_ | 109 #endif // NET_QUIC_QUIC_SERVER_SESSION_H_ |
OLD | NEW |