| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/streamer_interface.h" | 5 #include "net/tools/flip_server/streamer_interface.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "net/tools/balsa/balsa_frame.h" | 9 #include "net/tools/balsa/balsa_frame.h" |
| 10 #include "net/tools/flip_server/constants.h" | 10 #include "net/tools/flip_server/constants.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 Reset(); | 36 Reset(); |
| 37 delete http_framer_; | 37 delete http_framer_; |
| 38 } | 38 } |
| 39 | 39 |
| 40 void StreamerSM::set_is_request() { | 40 void StreamerSM::set_is_request() { |
| 41 is_request_ = true; | 41 is_request_ = true; |
| 42 http_framer_->set_is_request(true); | 42 http_framer_->set_is_request(true); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void StreamerSM::InitSMInterface(SMInterface* sm_other_interface, | 45 void StreamerSM::InitSMInterface(SMInterface* sm_other_interface, |
| 46 int32 server_idx) { | 46 int32_t server_idx) { |
| 47 sm_other_interface_ = sm_other_interface; | 47 sm_other_interface_ = sm_other_interface; |
| 48 } | 48 } |
| 49 | 49 |
| 50 void StreamerSM::InitSMConnection(SMConnectionPoolInterface* connection_pool, | 50 void StreamerSM::InitSMConnection(SMConnectionPoolInterface* connection_pool, |
| 51 SMInterface* sm_interface, | 51 SMInterface* sm_interface, |
| 52 EpollServer* epoll_server, | 52 EpollServer* epoll_server, |
| 53 int fd, | 53 int fd, |
| 54 std::string server_ip, | 54 std::string server_ip, |
| 55 std::string server_port, | 55 std::string server_port, |
| 56 std::string remote_ip, | 56 std::string remote_ip, |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 epoll_server_, | 136 epoll_server_, |
| 137 -1, | 137 -1, |
| 138 acceptor_->https_server_ip_, | 138 acceptor_->https_server_ip_, |
| 139 acceptor_->https_server_port_, | 139 acceptor_->https_server_port_, |
| 140 std::string(), | 140 std::string(), |
| 141 false); | 141 false); |
| 142 | 142 |
| 143 return 1; | 143 return 1; |
| 144 } | 144 } |
| 145 | 145 |
| 146 size_t StreamerSM::SendSynStream(uint32 stream_id, | 146 size_t StreamerSM::SendSynStream(uint32_t stream_id, |
| 147 const BalsaHeaders& headers) { | 147 const BalsaHeaders& headers) { |
| 148 return 0; | 148 return 0; |
| 149 } | 149 } |
| 150 | 150 |
| 151 size_t StreamerSM::SendSynReply(uint32 stream_id, const BalsaHeaders& headers) { | 151 size_t StreamerSM::SendSynReply(uint32_t stream_id, |
| 152 const BalsaHeaders& headers) { |
| 152 return 0; | 153 return 0; |
| 153 } | 154 } |
| 154 | 155 |
| 155 void StreamerSM::ProcessBodyInput(const char* input, size_t size) { | 156 void StreamerSM::ProcessBodyInput(const char* input, size_t size) { |
| 156 VLOG(2) << ACCEPTOR_CLIENT_IDENT | 157 VLOG(2) << ACCEPTOR_CLIENT_IDENT |
| 157 << "StreamerHttpSM: Process Body Input Data: " | 158 << "StreamerHttpSM: Process Body Input Data: " |
| 158 << "size " << size; | 159 << "size " << size; |
| 159 sm_other_interface_->ProcessWriteInput(input, size); | 160 sm_other_interface_->ProcessWriteInput(input, size); |
| 160 } | 161 } |
| 161 | 162 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 191 | 192 |
| 192 void StreamerSM::HandleChunkingError(BalsaFrame* framer) { HandleError(); } | 193 void StreamerSM::HandleChunkingError(BalsaFrame* framer) { HandleError(); } |
| 193 | 194 |
| 194 void StreamerSM::HandleBodyError(BalsaFrame* framer) { HandleError(); } | 195 void StreamerSM::HandleBodyError(BalsaFrame* framer) { HandleError(); } |
| 195 | 196 |
| 196 void StreamerSM::HandleError() { | 197 void StreamerSM::HandleError() { |
| 197 VLOG(1) << ACCEPTOR_CLIENT_IDENT << "Error detected"; | 198 VLOG(1) << ACCEPTOR_CLIENT_IDENT << "Error detected"; |
| 198 } | 199 } |
| 199 | 200 |
| 200 } // namespace net | 201 } // namespace net |
| OLD | NEW |