| 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_UDP_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 // P2PSocketHost overrides. | 46 // P2PSocketHost overrides. |
| 47 bool Init(const net::IPEndPoint& local_address, | 47 bool Init(const net::IPEndPoint& local_address, |
| 48 uint16_t min_port, | 48 uint16_t min_port, |
| 49 uint16_t max_port, | 49 uint16_t max_port, |
| 50 const P2PHostAndIPEndPoint& remote_address) override; | 50 const P2PHostAndIPEndPoint& remote_address) override; |
| 51 void Send(const net::IPEndPoint& to, | 51 void Send(const net::IPEndPoint& to, |
| 52 const std::vector<char>& data, | 52 const std::vector<char>& data, |
| 53 const rtc::PacketOptions& options, | 53 const rtc::PacketOptions& options, |
| 54 uint64_t packet_id) override; | 54 uint64_t packet_id) override; |
| 55 P2PSocketHost* AcceptIncomingTcpConnection( | 55 std::unique_ptr<P2PSocketHost> AcceptIncomingTcpConnection( |
| 56 const net::IPEndPoint& remote_address, | 56 const net::IPEndPoint& remote_address, |
| 57 int id) override; | 57 int id) override; |
| 58 bool SetOption(P2PSocketOption option, int value) override; | 58 bool SetOption(P2PSocketOption option, int value) override; |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 friend class P2PSocketHostUdpTest; | 61 friend class P2PSocketHostUdpTest; |
| 62 | 62 |
| 63 typedef std::set<net::IPEndPoint> ConnectedPeerSet; | 63 typedef std::set<net::IPEndPoint> ConnectedPeerSet; |
| 64 | 64 |
| 65 struct PendingPacket { | 65 struct PendingPacket { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 // Callback object that returns a new socket when invoked. | 114 // Callback object that returns a new socket when invoked. |
| 115 DatagramServerSocketFactory socket_factory_; | 115 DatagramServerSocketFactory socket_factory_; |
| 116 | 116 |
| 117 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostUdp); | 117 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostUdp); |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 } // namespace content | 120 } // namespace content |
| 121 | 121 |
| 122 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ | 122 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ |
| OLD | NEW |