| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 enum Options { | 23 enum Options { |
| 24 OPT_SSLTCP = 0x01, // Pseudo-TLS. | 24 OPT_SSLTCP = 0x01, // Pseudo-TLS. |
| 25 OPT_TLS = 0x02, | 25 OPT_TLS = 0x02, |
| 26 OPT_STUN = 0x04, | 26 OPT_STUN = 0x04, |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 PacketSocketFactory() { } | 29 PacketSocketFactory() { } |
| 30 virtual ~PacketSocketFactory() { } | 30 virtual ~PacketSocketFactory() { } |
| 31 | 31 |
| 32 virtual AsyncPacketSocket* CreateUdpSocket(const SocketAddress& address, | 32 virtual AsyncPacketSocket* CreateUdpSocket(const SocketAddress& address, |
| 33 uint16 min_port, | 33 uint16_t min_port, |
| 34 uint16 max_port) = 0; | 34 uint16_t max_port) = 0; |
| 35 virtual AsyncPacketSocket* CreateServerTcpSocket( | 35 virtual AsyncPacketSocket* CreateServerTcpSocket( |
| 36 const SocketAddress& local_address, | 36 const SocketAddress& local_address, |
| 37 uint16 min_port, | 37 uint16_t min_port, |
| 38 uint16 max_port, | 38 uint16_t max_port, |
| 39 int opts) = 0; | 39 int opts) = 0; |
| 40 | 40 |
| 41 // TODO: |proxy_info| and |user_agent| should be set | 41 // TODO: |proxy_info| and |user_agent| should be set |
| 42 // per-factory and not when socket is created. | 42 // per-factory and not when socket is created. |
| 43 virtual AsyncPacketSocket* CreateClientTcpSocket( | 43 virtual AsyncPacketSocket* CreateClientTcpSocket( |
| 44 const SocketAddress& local_address, | 44 const SocketAddress& local_address, |
| 45 const SocketAddress& remote_address, | 45 const SocketAddress& remote_address, |
| 46 const ProxyInfo& proxy_info, | 46 const ProxyInfo& proxy_info, |
| 47 const std::string& user_agent, | 47 const std::string& user_agent, |
| 48 int opts) = 0; | 48 int opts) = 0; |
| 49 | 49 |
| 50 virtual AsyncResolverInterface* CreateAsyncResolver() = 0; | 50 virtual AsyncResolverInterface* CreateAsyncResolver() = 0; |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 RTC_DISALLOW_COPY_AND_ASSIGN(PacketSocketFactory); | 53 RTC_DISALLOW_COPY_AND_ASSIGN(PacketSocketFactory); |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 } // namespace rtc | 56 } // namespace rtc |
| 57 | 57 |
| 58 #endif // WEBRTC_P2P_BASE_PACKETSOCKETFACTORY_H_ | 58 #endif // WEBRTC_P2P_BASE_PACKETSOCKETFACTORY_H_ |
| OLD | NEW |