| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "net/spdy/spdy_framer.h" | 10 #include "net/spdy/spdy_framer.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 << server_idx; | 105 << server_idx; |
| 106 } else { | 106 } else { |
| 107 server_idx = unused_server_interface_list.back(); | 107 server_idx = unused_server_interface_list.back(); |
| 108 unused_server_interface_list.pop_back(); | 108 unused_server_interface_list.pop_back(); |
| 109 sm_http_interface = server_interface_list.at(server_idx); | 109 sm_http_interface = server_interface_list.at(server_idx); |
| 110 VLOG(2) << ACCEPTOR_CLIENT_IDENT << "SpdySM: Reusing connection on " | 110 VLOG(2) << ACCEPTOR_CLIENT_IDENT << "SpdySM: Reusing connection on " |
| 111 << "index: " << server_idx; | 111 << "index: " << server_idx; |
| 112 } | 112 } |
| 113 | 113 |
| 114 sm_http_interface->InitSMInterface(this, server_idx); | 114 sm_http_interface->InitSMInterface(this, server_idx); |
| 115 sm_http_interface->InitSMConnection(NULL, sm_http_interface, | 115 sm_http_interface->InitSMConnection(NULL, |
| 116 epoll_server_, -1, | 116 sm_http_interface, |
| 117 server_ip, server_port, "", false); | 117 epoll_server_, |
| 118 -1, |
| 119 server_ip, |
| 120 server_port, |
| 121 std::string(), |
| 122 false); |
| 118 | 123 |
| 119 return sm_http_interface; | 124 return sm_http_interface; |
| 120 } | 125 } |
| 121 | 126 |
| 122 int SpdySM::SpdyHandleNewStream( | 127 int SpdySM::SpdyHandleNewStream( |
| 123 SpdyStreamId stream_id, | 128 SpdyStreamId stream_id, |
| 124 SpdyPriority priority, | 129 SpdyPriority priority, |
| 125 const SpdyHeaderBlock& headers, | 130 const SpdyHeaderBlock& headers, |
| 126 std::string &http_data, | 131 std::string &http_data, |
| 127 bool* is_https_scheme) { | 132 bool* is_https_scheme) { |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 mci->file_data->body.data() + mci->body_bytes_consumed, | 560 mci->file_data->body.data() + mci->body_bytes_consumed, |
| 556 num_to_write, 0, should_compress); | 561 num_to_write, 0, should_compress); |
| 557 VLOG(2) << ACCEPTOR_CLIENT_IDENT << "SpdySM: GetOutput SendDataFrame[" | 562 VLOG(2) << ACCEPTOR_CLIENT_IDENT << "SpdySM: GetOutput SendDataFrame[" |
| 558 << mci->stream_id << "]: " << num_to_write; | 563 << mci->stream_id << "]: " << num_to_write; |
| 559 mci->body_bytes_consumed += num_to_write; | 564 mci->body_bytes_consumed += num_to_write; |
| 560 mci->bytes_sent += num_to_write; | 565 mci->bytes_sent += num_to_write; |
| 561 } | 566 } |
| 562 } | 567 } |
| 563 | 568 |
| 564 } // namespace net | 569 } // namespace net |
| OLD | NEW |