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_server.h" | 5 #include "content/browser/renderer_host/p2p/socket_host_tcp_server.h" |
6 | 6 |
7 #include "base/stl_util-inl.h" | 7 #include "base/stl_util.h" |
8 #include "content/browser/renderer_host/p2p/socket_host_tcp.h" | 8 #include "content/browser/renderer_host/p2p/socket_host_tcp.h" |
9 #include "content/common/p2p_messages.h" | 9 #include "content/common/p2p_messages.h" |
10 #include "net/base/address_list.h" | 10 #include "net/base/address_list.h" |
11 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
12 #include "net/base/net_util.h" | 12 #include "net/base/net_util.h" |
13 #include "net/base/sys_addrinfo.h" | 13 #include "net/base/sys_addrinfo.h" |
14 #include "net/socket/stream_socket.h" | 14 #include "net/socket/stream_socket.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 const int kListenBacklog = 5; | 17 const int kListenBacklog = 5; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 net::StreamSocket* socket = it->second; | 129 net::StreamSocket* socket = it->second; |
130 accepted_sockets_.erase(it); | 130 accepted_sockets_.erase(it); |
131 scoped_ptr<P2PSocketHostTcp> result( | 131 scoped_ptr<P2PSocketHostTcp> result( |
132 new P2PSocketHostTcp(message_sender_, routing_id_, id)); | 132 new P2PSocketHostTcp(message_sender_, routing_id_, id)); |
133 if (!result->InitAccepted(remote_address, socket)) | 133 if (!result->InitAccepted(remote_address, socket)) |
134 return NULL; | 134 return NULL; |
135 | 135 |
136 return result.release(); | 136 return result.release(); |
137 } | 137 } |
OLD | NEW |