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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 buffered_spdy_framer_ = new BufferedSpdyFramer(2); | 312 buffered_spdy_framer_ = new BufferedSpdyFramer(2); |
313 buffered_spdy_framer_->set_visitor(this); | 313 buffered_spdy_framer_->set_visitor(this); |
314 valid_spdy_session_ = false; | 314 valid_spdy_session_ = false; |
315 client_output_ordering_.Reset(); | 315 client_output_ordering_.Reset(); |
316 next_outgoing_stream_id_ = 2; | 316 next_outgoing_stream_id_ = 2; |
317 } | 317 } |
318 | 318 |
319 // Send a settings frame | 319 // Send a settings frame |
320 int SpdySM::PostAcceptHook() { | 320 int SpdySM::PostAcceptHook() { |
321 SpdySettings settings; | 321 SpdySettings settings; |
322 SettingsFlagsAndId settings_id(SETTINGS_MAX_CONCURRENT_STREAMS); | 322 SettingsFlagsAndId settings_id(0, SETTINGS_MAX_CONCURRENT_STREAMS); |
323 settings.push_back(SpdySetting(settings_id, 100)); | 323 settings.push_back(SpdySetting(settings_id, 100)); |
324 SpdySettingsControlFrame* settings_frame = | 324 SpdySettingsControlFrame* settings_frame = |
325 SpdyFramer::CreateSettings(settings); | 325 buffered_spdy_framer_->CreateSettings(settings); |
326 | 326 |
327 VLOG(1) << ACCEPTOR_CLIENT_IDENT << "Sending Settings Frame"; | 327 VLOG(1) << ACCEPTOR_CLIENT_IDENT << "Sending Settings Frame"; |
328 EnqueueDataFrame(new SpdyFrameDataFrame(settings_frame)); | 328 EnqueueDataFrame(new SpdyFrameDataFrame(settings_frame)); |
329 return 1; | 329 return 1; |
330 } | 330 } |
331 | 331 |
332 void SpdySM::NewStream(uint32 stream_id, | 332 void SpdySM::NewStream(uint32 stream_id, |
333 uint32 priority, | 333 uint32 priority, |
334 const std::string& filename) { | 334 const std::string& filename) { |
335 MemCacheIter mci; | 335 MemCacheIter mci; |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 mci->file_data->body.data() + mci->body_bytes_consumed, | 573 mci->file_data->body.data() + mci->body_bytes_consumed, |
574 num_to_write, 0, should_compress); | 574 num_to_write, 0, should_compress); |
575 VLOG(2) << ACCEPTOR_CLIENT_IDENT << "SpdySM: GetOutput SendDataFrame[" | 575 VLOG(2) << ACCEPTOR_CLIENT_IDENT << "SpdySM: GetOutput SendDataFrame[" |
576 << mci->stream_id << "]: " << num_to_write; | 576 << mci->stream_id << "]: " << num_to_write; |
577 mci->body_bytes_consumed += num_to_write; | 577 mci->body_bytes_consumed += num_to_write; |
578 mci->bytes_sent += num_to_write; | 578 mci->bytes_sent += num_to_write; |
579 } | 579 } |
580 } | 580 } |
581 | 581 |
582 } // namespace net | 582 } // namespace net |
OLD | NEW |