| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 if (GetCryptoStream() == nullptr) { | 88 if (GetCryptoStream() == nullptr) { |
| 89 return false; | 89 return false; |
| 90 } | 90 } |
| 91 return GetCryptoStream()->peer_supports_stateless_rejects(); | 91 return GetCryptoStream()->peer_supports_stateless_rejects(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 void set_serving_region(const std::string& serving_region) { | 94 void set_serving_region(const std::string& serving_region) { |
| 95 serving_region_ = serving_region; | 95 serving_region_ = serving_region; |
| 96 } | 96 } |
| 97 | 97 |
| 98 void set_use_stateless_rejects_if_peer_supported( | |
| 99 bool use_stateless_rejects_if_peer_supported) { | |
| 100 DCHECK(GetCryptoStream() != nullptr); | |
| 101 GetCryptoStream()->set_use_stateless_rejects_if_peer_supported( | |
| 102 use_stateless_rejects_if_peer_supported); | |
| 103 } | |
| 104 | |
| 105 protected: | 98 protected: |
| 106 // QuicSession methods: | 99 // QuicSession methods: |
| 107 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override; | 100 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override; |
| 108 QuicSpdyStream* CreateOutgoingDynamicStream() override; | 101 QuicSpdyStream* CreateOutgoingDynamicStream() override; |
| 109 QuicCryptoServerStream* GetCryptoStream() override; | 102 QuicCryptoServerStream* GetCryptoStream() override; |
| 110 | 103 |
| 111 // If we should create an incoming stream, returns true. Otherwise | 104 // If we should create an incoming stream, returns true. Otherwise |
| 112 // does error handling, including communicating the error to the client and | 105 // does error handling, including communicating the error to the client and |
| 113 // possibly closing the connection, and returns false. | 106 // possibly closing the connection, and returns false. |
| 114 virtual bool ShouldCreateIncomingDynamicStream(QuicStreamId id); | 107 virtual bool ShouldCreateIncomingDynamicStream(QuicStreamId id); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 139 // Number of packets sent to the peer, at the time we last sent a SCUP. | 132 // Number of packets sent to the peer, at the time we last sent a SCUP. |
| 140 int64 last_scup_packet_number_; | 133 int64 last_scup_packet_number_; |
| 141 | 134 |
| 142 DISALLOW_COPY_AND_ASSIGN(QuicServerSession); | 135 DISALLOW_COPY_AND_ASSIGN(QuicServerSession); |
| 143 }; | 136 }; |
| 144 | 137 |
| 145 } // namespace tools | 138 } // namespace tools |
| 146 } // namespace net | 139 } // namespace net |
| 147 | 140 |
| 148 #endif // NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_ | 141 #endif // NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_ |
| OLD | NEW |