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/server/http_connection.h" | 5 #include "net/server/http_connection.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "net/base/stream_listen_socket.h" | |
10 #include "net/server/http_server.h" | 9 #include "net/server/http_server.h" |
11 #include "net/server/web_socket.h" | 10 #include "net/server/web_socket.h" |
| 11 #include "net/socket/stream_listen_socket.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 int HttpConnection::last_id_ = 0; | 15 int HttpConnection::last_id_ = 0; |
16 | 16 |
17 void HttpConnection::Send(const std::string& data) { | 17 void HttpConnection::Send(const std::string& data) { |
18 if (!socket_) | 18 if (!socket_) |
19 return; | 19 return; |
20 socket_->Send(data); | 20 socket_->Send(data); |
21 } | 21 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 void HttpConnection::DetachSocket() { | 74 void HttpConnection::DetachSocket() { |
75 socket_ = NULL; | 75 socket_ = NULL; |
76 } | 76 } |
77 | 77 |
78 void HttpConnection::Shift(int num_bytes) { | 78 void HttpConnection::Shift(int num_bytes) { |
79 recv_data_ = recv_data_.substr(num_bytes); | 79 recv_data_ = recv_data_.substr(num_bytes); |
80 } | 80 } |
81 | 81 |
82 } // namespace net | 82 } // namespace net |
OLD | NEW |