OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/renderer_host/p2p/socket_host_tcp.h" | 5 #include "content/browser/renderer_host/p2p/socket_host_tcp.h" |
6 | 6 |
| 7 #include "base/sys_byteorder.h" |
7 #include "content/common/p2p_messages.h" | 8 #include "content/common/p2p_messages.h" |
8 #include "net/base/io_buffer.h" | 9 #include "net/base/io_buffer.h" |
9 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
10 #include "net/base/net_util.h" | 11 #include "net/base/net_util.h" |
11 #include "net/base/sys_byteorder.h" | |
12 #include "net/socket/tcp_client_socket.h" | 12 #include "net/socket/tcp_client_socket.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 const int kReadBufferSize = 4096; | 15 const int kReadBufferSize = 4096; |
16 const int kPacketHeaderSize = sizeof(uint16); | 16 const int kPacketHeaderSize = sizeof(uint16); |
17 } // namespace | 17 } // namespace |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 | 20 |
21 P2PSocketHostTcp::P2PSocketHostTcp(IPC::Message::Sender* message_sender, | 21 P2PSocketHostTcp::P2PSocketHostTcp(IPC::Message::Sender* message_sender, |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 } | 266 } |
267 | 267 |
268 P2PSocketHost* P2PSocketHostTcp::AcceptIncomingTcpConnection( | 268 P2PSocketHost* P2PSocketHostTcp::AcceptIncomingTcpConnection( |
269 const net::IPEndPoint& remote_address, int id) { | 269 const net::IPEndPoint& remote_address, int id) { |
270 NOTREACHED(); | 270 NOTREACHED(); |
271 OnError(); | 271 OnError(); |
272 return NULL; | 272 return NULL; |
273 } | 273 } |
274 | 274 |
275 } // namespace content | 275 } // namespace content |
OLD | NEW |