Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: net/tools/quic/quic_server_session.cc

Issue 1138443003: Land Recent QUIC Changes until 05/13/2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile error fixes Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/tools/quic/quic_server_session.h ('k') | net/tools/quic/quic_server_session_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "net/tools/quic/quic_server_session.h" 5 #include "net/tools/quic/quic_server_session.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/quic/proto/cached_network_parameters.pb.h" 8 #include "net/quic/proto/cached_network_parameters.pb.h"
9 #include "net/quic/quic_connection.h" 9 #include "net/quic/quic_connection.h"
10 #include "net/quic/quic_flags.h" 10 #include "net/quic/quic_flags.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 crypto_stream_->SendServerConfigUpdate(&cached_network_params); 168 crypto_stream_->SendServerConfigUpdate(&cached_network_params);
169 169
170 connection()->OnSendConnectionState(cached_network_params); 170 connection()->OnSendConnectionState(cached_network_params);
171 171
172 last_scup_time_ = now; 172 last_scup_time_ = now;
173 last_scup_sequence_number_ = 173 last_scup_sequence_number_ =
174 connection()->sequence_number_of_last_sent_packet(); 174 connection()->sequence_number_of_last_sent_packet();
175 } 175 }
176 176
177 bool QuicServerSession::ShouldCreateIncomingDataStream(QuicStreamId id) { 177 bool QuicServerSession::ShouldCreateIncomingDataStream(QuicStreamId id) {
178 if (!connection()->connected()) {
179 LOG(DFATAL) << "ShouldCreateIncomingDataStream called when disconnected";
180 return false;
181 }
182
178 if (id % 2 == 0) { 183 if (id % 2 == 0) {
179 DVLOG(1) << "Invalid incoming even stream_id:" << id; 184 DVLOG(1) << "Invalid incoming even stream_id:" << id;
180 connection()->SendConnectionClose(QUIC_INVALID_STREAM_ID); 185 connection()->SendConnectionClose(QUIC_INVALID_STREAM_ID);
181 return false; 186 return false;
182 } 187 }
183 if (GetNumOpenStreams() >= get_max_open_streams()) { 188 if (GetNumOpenStreams() >= get_max_open_streams()) {
184 DVLOG(1) << "Failed to create a new incoming stream with id:" << id 189 DVLOG(1) << "Failed to create a new incoming stream with id:" << id
185 << " Already " << GetNumOpenStreams() << " streams open (max " 190 << " Already " << GetNumOpenStreams() << " streams open (max "
186 << get_max_open_streams() << ")."; 191 << get_max_open_streams() << ").";
187 connection()->SendConnectionClose(QUIC_TOO_MANY_OPEN_STREAMS); 192 connection()->SendConnectionClose(QUIC_TOO_MANY_OPEN_STREAMS);
(...skipping 15 matching lines...) Expand all
203 DLOG(ERROR) << "Server push not yet supported"; 208 DLOG(ERROR) << "Server push not yet supported";
204 return nullptr; 209 return nullptr;
205 } 210 }
206 211
207 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { 212 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() {
208 return crypto_stream_.get(); 213 return crypto_stream_.get();
209 } 214 }
210 215
211 } // namespace tools 216 } // namespace tools
212 } // namespace net 217 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_server_session.h ('k') | net/tools/quic/quic_server_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698