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 <deque> | 8 #include <deque> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 14 matching lines...) Expand all Loading... |
25 class P2PMessageThrottler; | 25 class P2PMessageThrottler; |
26 | 26 |
27 class CONTENT_EXPORT P2PSocketHostUdp : public P2PSocketHost { | 27 class CONTENT_EXPORT P2PSocketHostUdp : public P2PSocketHost { |
28 public: | 28 public: |
29 P2PSocketHostUdp(IPC::Sender* message_sender, int id, | 29 P2PSocketHostUdp(IPC::Sender* message_sender, int id, |
30 P2PMessageThrottler* throttler); | 30 P2PMessageThrottler* throttler); |
31 virtual ~P2PSocketHostUdp(); | 31 virtual ~P2PSocketHostUdp(); |
32 | 32 |
33 // P2PSocketHost overrides. | 33 // P2PSocketHost overrides. |
34 virtual bool Init(const net::IPEndPoint& local_address, | 34 virtual bool Init(const net::IPEndPoint& local_address, |
35 const net::IPEndPoint& remote_address) OVERRIDE; | 35 const P2PHostAndIPEndPoint& remote_address) OVERRIDE; |
36 virtual void Send(const net::IPEndPoint& to, | 36 virtual void Send(const net::IPEndPoint& to, |
37 const std::vector<char>& data, | 37 const std::vector<char>& data, |
38 const talk_base::PacketOptions& options, | 38 const talk_base::PacketOptions& options, |
39 uint64 packet_id) OVERRIDE; | 39 uint64 packet_id) OVERRIDE; |
40 virtual P2PSocketHost* AcceptIncomingTcpConnection( | 40 virtual P2PSocketHost* AcceptIncomingTcpConnection( |
41 const net::IPEndPoint& remote_address, int id) OVERRIDE; | 41 const net::IPEndPoint& remote_address, int id) OVERRIDE; |
42 virtual bool SetOption(P2PSocketOption option, int value) OVERRIDE; | 42 virtual bool SetOption(P2PSocketOption option, int value) OVERRIDE; |
43 | 43 |
44 private: | 44 private: |
45 friend class P2PSocketHostUdpTest; | 45 friend class P2PSocketHostUdpTest; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // response or relay allocation request or response. | 81 // response or relay allocation request or response. |
82 ConnectedPeerSet connected_peers_; | 82 ConnectedPeerSet connected_peers_; |
83 P2PMessageThrottler* throttler_; | 83 P2PMessageThrottler* throttler_; |
84 | 84 |
85 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostUdp); | 85 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostUdp); |
86 }; | 86 }; |
87 | 87 |
88 } // namespace content | 88 } // namespace content |
89 | 89 |
90 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ | 90 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ |
OLD | NEW |