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_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 24 matching lines...) Expand all Loading... |
35 int socket_id, | 35 int socket_id, |
36 P2PSocketType type, | 36 P2PSocketType type, |
37 net::URLRequestContextGetter* url_context); | 37 net::URLRequestContextGetter* url_context); |
38 ~P2PSocketHostTcpBase() override; | 38 ~P2PSocketHostTcpBase() override; |
39 | 39 |
40 bool InitAccepted(const net::IPEndPoint& remote_address, | 40 bool InitAccepted(const net::IPEndPoint& remote_address, |
41 net::StreamSocket* socket); | 41 net::StreamSocket* socket); |
42 | 42 |
43 // P2PSocketHost overrides. | 43 // P2PSocketHost overrides. |
44 bool Init(const net::IPEndPoint& local_address, | 44 bool Init(const net::IPEndPoint& local_address, |
| 45 uint16_t min_port, |
| 46 uint16_t max_port, |
45 const P2PHostAndIPEndPoint& remote_address) override; | 47 const P2PHostAndIPEndPoint& remote_address) override; |
46 void Send(const net::IPEndPoint& to, | 48 void Send(const net::IPEndPoint& to, |
47 const std::vector<char>& data, | 49 const std::vector<char>& data, |
48 const rtc::PacketOptions& options, | 50 const rtc::PacketOptions& options, |
49 uint64_t packet_id) override; | 51 uint64_t packet_id) override; |
50 P2PSocketHost* AcceptIncomingTcpConnection( | 52 P2PSocketHost* AcceptIncomingTcpConnection( |
51 const net::IPEndPoint& remote_address, | 53 const net::IPEndPoint& remote_address, |
52 int id) override; | 54 int id) override; |
53 bool SetOption(P2PSocketOption option, int value) override; | 55 bool SetOption(P2PSocketOption option, int value) override; |
54 | 56 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 private: | 144 private: |
143 int GetExpectedPacketSize(const char* data, int len, int* pad_bytes); | 145 int GetExpectedPacketSize(const char* data, int len, int* pad_bytes); |
144 | 146 |
145 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostStunTcp); | 147 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostStunTcp); |
146 }; | 148 }; |
147 | 149 |
148 | 150 |
149 } // namespace content | 151 } // namespace content |
150 | 152 |
151 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_ | 153 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_ |
OLD | NEW |