| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 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 |
| 11 #ifndef WEBRTC_P2P_BASE_STUNPORT_H_ | 11 #ifndef WEBRTC_P2P_BASE_STUNPORT_H_ |
| 12 #define WEBRTC_P2P_BASE_STUNPORT_H_ | 12 #define WEBRTC_P2P_BASE_STUNPORT_H_ |
| 13 | 13 |
| 14 #include <memory> |
| 14 #include <string> | 15 #include <string> |
| 15 | 16 |
| 16 #include "webrtc/p2p/base/port.h" | 17 #include "webrtc/p2p/base/port.h" |
| 17 #include "webrtc/p2p/base/stunrequest.h" | 18 #include "webrtc/p2p/base/stunrequest.h" |
| 18 #include "webrtc/base/asyncpacketsocket.h" | 19 #include "webrtc/base/asyncpacketsocket.h" |
| 19 | 20 |
| 20 // TODO(mallinath) - Rename stunport.cc|h to udpport.cc|h. | 21 // TODO(mallinath) - Rename stunport.cc|h to udpport.cc|h. |
| 21 namespace rtc { | 22 namespace rtc { |
| 22 class AsyncResolver; | 23 class AsyncResolver; |
| 23 class SignalThread; | 24 class SignalThread; |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 void MaybeSetPortCompleteOrError(); | 218 void MaybeSetPortCompleteOrError(); |
| 218 | 219 |
| 219 bool HasCandidateWithAddress(const rtc::SocketAddress& addr) const; | 220 bool HasCandidateWithAddress(const rtc::SocketAddress& addr) const; |
| 220 | 221 |
| 221 ServerAddresses server_addresses_; | 222 ServerAddresses server_addresses_; |
| 222 ServerAddresses bind_request_succeeded_servers_; | 223 ServerAddresses bind_request_succeeded_servers_; |
| 223 ServerAddresses bind_request_failed_servers_; | 224 ServerAddresses bind_request_failed_servers_; |
| 224 StunRequestManager requests_; | 225 StunRequestManager requests_; |
| 225 rtc::AsyncPacketSocket* socket_; | 226 rtc::AsyncPacketSocket* socket_; |
| 226 int error_; | 227 int error_; |
| 227 rtc::scoped_ptr<AddressResolver> resolver_; | 228 std::unique_ptr<AddressResolver> resolver_; |
| 228 bool ready_; | 229 bool ready_; |
| 229 int stun_keepalive_delay_; | 230 int stun_keepalive_delay_; |
| 230 int stun_keepalive_lifetime_; | 231 int stun_keepalive_lifetime_; |
| 231 | 232 |
| 232 // This is true by default and false when | 233 // This is true by default and false when |
| 233 // PORTALLOCATOR_DISABLE_DEFAULT_LOCAL_CANDIDATE is specified. | 234 // PORTALLOCATOR_DISABLE_DEFAULT_LOCAL_CANDIDATE is specified. |
| 234 bool emit_local_for_anyaddress_; | 235 bool emit_local_for_anyaddress_; |
| 235 | 236 |
| 236 friend class StunBindingRequest; | 237 friend class StunBindingRequest; |
| 237 }; | 238 }; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 false) { | 289 false) { |
| 289 // UDPPort will set these to local udp, updating these to STUN. | 290 // UDPPort will set these to local udp, updating these to STUN. |
| 290 set_type(STUN_PORT_TYPE); | 291 set_type(STUN_PORT_TYPE); |
| 291 set_server_addresses(servers); | 292 set_server_addresses(servers); |
| 292 } | 293 } |
| 293 }; | 294 }; |
| 294 | 295 |
| 295 } // namespace cricket | 296 } // namespace cricket |
| 296 | 297 |
| 297 #endif // WEBRTC_P2P_BASE_STUNPORT_H_ | 298 #endif // WEBRTC_P2P_BASE_STUNPORT_H_ |
| OLD | NEW |