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 #include "net/tools/flip_server/spdy_interface.h" | 5 #include "net/tools/flip_server/spdy_interface.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "net/spdy/spdy_framer.h" | 9 #include "net/spdy/spdy_framer.h" |
10 #include "net/spdy/spdy_protocol.h" | 10 #include "net/spdy/spdy_protocol.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 delete buffered_spdy_framer_; | 286 delete buffered_spdy_framer_; |
287 buffered_spdy_framer_ = new BufferedSpdyFramer(2); | 287 buffered_spdy_framer_ = new BufferedSpdyFramer(2); |
288 buffered_spdy_framer_->set_visitor(this); | 288 buffered_spdy_framer_->set_visitor(this); |
289 valid_spdy_session_ = false; | 289 valid_spdy_session_ = false; |
290 client_output_ordering_.Reset(); | 290 client_output_ordering_.Reset(); |
291 next_outgoing_stream_id_ = 2; | 291 next_outgoing_stream_id_ = 2; |
292 } | 292 } |
293 | 293 |
294 // Send a settings frame | 294 // Send a settings frame |
295 int SpdySM::PostAcceptHook() { | 295 int SpdySM::PostAcceptHook() { |
296 SpdySettings settings; | 296 SettingsMap settings; |
297 SettingsFlagsAndId settings_id(0, SETTINGS_MAX_CONCURRENT_STREAMS); | 297 settings[SETTINGS_MAX_CONCURRENT_STREAMS] = |
298 settings.push_back(SpdySetting(settings_id, 100)); | 298 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, 100); |
299 SpdySettingsControlFrame* settings_frame = | 299 SpdySettingsControlFrame* settings_frame = |
300 buffered_spdy_framer_->CreateSettings(settings); | 300 buffered_spdy_framer_->CreateSettings(settings); |
301 | 301 |
302 VLOG(1) << ACCEPTOR_CLIENT_IDENT << "Sending Settings Frame"; | 302 VLOG(1) << ACCEPTOR_CLIENT_IDENT << "Sending Settings Frame"; |
303 EnqueueDataFrame(new SpdyFrameDataFrame(settings_frame)); | 303 EnqueueDataFrame(new SpdyFrameDataFrame(settings_frame)); |
304 return 1; | 304 return 1; |
305 } | 305 } |
306 | 306 |
307 void SpdySM::NewStream(uint32 stream_id, | 307 void SpdySM::NewStream(uint32 stream_id, |
308 uint32 priority, | 308 uint32 priority, |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 mci->file_data->body.data() + mci->body_bytes_consumed, | 548 mci->file_data->body.data() + mci->body_bytes_consumed, |
549 num_to_write, 0, should_compress); | 549 num_to_write, 0, should_compress); |
550 VLOG(2) << ACCEPTOR_CLIENT_IDENT << "SpdySM: GetOutput SendDataFrame[" | 550 VLOG(2) << ACCEPTOR_CLIENT_IDENT << "SpdySM: GetOutput SendDataFrame[" |
551 << mci->stream_id << "]: " << num_to_write; | 551 << mci->stream_id << "]: " << num_to_write; |
552 mci->body_bytes_consumed += num_to_write; | 552 mci->body_bytes_consumed += num_to_write; |
553 mci->bytes_sent += num_to_write; | 553 mci->bytes_sent += num_to_write; |
554 } | 554 } |
555 } | 555 } |
556 | 556 |
557 } // namespace net | 557 } // namespace net |
OLD | NEW |