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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 20 matching lines...) Expand all Loading... |
31 public: | 31 public: |
32 typedef std::map<net::IPEndPoint, net::StreamSocket*> AcceptedSocketsMap; | 32 typedef std::map<net::IPEndPoint, net::StreamSocket*> AcceptedSocketsMap; |
33 | 33 |
34 P2PSocketHostTcpServer(IPC::Sender* message_sender, | 34 P2PSocketHostTcpServer(IPC::Sender* message_sender, |
35 int socket_id, | 35 int socket_id, |
36 P2PSocketType client_type); | 36 P2PSocketType client_type); |
37 ~P2PSocketHostTcpServer() override; | 37 ~P2PSocketHostTcpServer() override; |
38 | 38 |
39 // P2PSocketHost overrides. | 39 // P2PSocketHost overrides. |
40 bool Init(const net::IPEndPoint& local_address, | 40 bool Init(const net::IPEndPoint& local_address, |
| 41 uint16_t min_port, |
| 42 uint16_t max_port, |
41 const P2PHostAndIPEndPoint& remote_address) override; | 43 const P2PHostAndIPEndPoint& remote_address) override; |
42 void Send(const net::IPEndPoint& to, | 44 void Send(const net::IPEndPoint& to, |
43 const std::vector<char>& data, | 45 const std::vector<char>& data, |
44 const rtc::PacketOptions& options, | 46 const rtc::PacketOptions& options, |
45 uint64_t packet_id) override; | 47 uint64_t packet_id) override; |
46 P2PSocketHost* AcceptIncomingTcpConnection( | 48 P2PSocketHost* AcceptIncomingTcpConnection( |
47 const net::IPEndPoint& remote_address, | 49 const net::IPEndPoint& remote_address, |
48 int id) override; | 50 int id) override; |
49 bool SetOption(P2PSocketOption option, int value) override; | 51 bool SetOption(P2PSocketOption option, int value) override; |
50 | 52 |
(...skipping 16 matching lines...) Expand all Loading... |
67 AcceptedSocketsMap accepted_sockets_; | 69 AcceptedSocketsMap accepted_sockets_; |
68 | 70 |
69 net::CompletionCallback accept_callback_; | 71 net::CompletionCallback accept_callback_; |
70 | 72 |
71 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostTcpServer); | 73 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostTcpServer); |
72 }; | 74 }; |
73 | 75 |
74 } // namespace content | 76 } // namespace content |
75 | 77 |
76 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_SERVER_H_ | 78 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_SERVER_H_ |
OLD | NEW |