| 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_SERVER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_SERVER_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_SERVER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_SERVER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 namespace net { | 21 namespace net { |
| 22 class StreamSocket; | 22 class StreamSocket; |
| 23 } // namespace net | 23 } // namespace net |
| 24 | 24 |
| 25 namespace content { | 25 namespace content { |
| 26 | 26 |
| 27 class CONTENT_EXPORT P2PSocketHostTcpServer : public P2PSocketHost { | 27 class CONTENT_EXPORT P2PSocketHostTcpServer : public P2PSocketHost { |
| 28 public: | 28 public: |
| 29 typedef std::map<net::IPEndPoint, net::StreamSocket*> AcceptedSocketsMap; | 29 typedef std::map<net::IPEndPoint, net::StreamSocket*> AcceptedSocketsMap; |
| 30 | 30 |
| 31 P2PSocketHostTcpServer(IPC::Sender* message_sender, int id, | 31 P2PSocketHostTcpServer(IPC::Sender* message_sender, |
| 32 int socket_id, |
| 33 int render_host_process_id, |
| 32 P2PSocketType client_type); | 34 P2PSocketType client_type); |
| 33 virtual ~P2PSocketHostTcpServer(); | 35 virtual ~P2PSocketHostTcpServer(); |
| 34 | 36 |
| 35 // P2PSocketHost overrides. | 37 // P2PSocketHost overrides. |
| 36 virtual bool Init(const net::IPEndPoint& local_address, | 38 virtual bool Init(const net::IPEndPoint& local_address, |
| 37 const P2PHostAndIPEndPoint& remote_address) OVERRIDE; | 39 const P2PHostAndIPEndPoint& remote_address) OVERRIDE; |
| 38 virtual void Send(const net::IPEndPoint& to, | 40 virtual void Send(const net::IPEndPoint& to, |
| 39 const std::vector<char>& data, | 41 const std::vector<char>& data, |
| 40 const talk_base::PacketOptions& options, | 42 const talk_base::PacketOptions& options, |
| 41 uint64 packet_id) OVERRIDE; | 43 uint64 packet_id) OVERRIDE; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 63 AcceptedSocketsMap accepted_sockets_; | 65 AcceptedSocketsMap accepted_sockets_; |
| 64 | 66 |
| 65 net::CompletionCallback accept_callback_; | 67 net::CompletionCallback accept_callback_; |
| 66 | 68 |
| 67 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostTcpServer); | 69 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostTcpServer); |
| 68 }; | 70 }; |
| 69 | 71 |
| 70 } // namespace content | 72 } // namespace content |
| 71 | 73 |
| 72 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_SERVER_H_ | 74 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_SERVER_H_ |
| OLD | NEW |