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 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 198 |
199 // Sends STUN requests to the server. | 199 // Sends STUN requests to the server. |
200 void OnSendPacket(const void* data, size_t size, StunRequest* req); | 200 void OnSendPacket(const void* data, size_t size, StunRequest* req); |
201 | 201 |
202 // TODO(mallinaht) - Move this up to cricket::Port when SignalAddressReady is | 202 // TODO(mallinaht) - Move this up to cricket::Port when SignalAddressReady is |
203 // changed to SignalPortReady. | 203 // changed to SignalPortReady. |
204 void MaybeSetPortCompleteOrError(); | 204 void MaybeSetPortCompleteOrError(); |
205 | 205 |
206 bool HasCandidateWithAddress(const rtc::SocketAddress& addr) const; | 206 bool HasCandidateWithAddress(const rtc::SocketAddress& addr) const; |
207 | 207 |
| 208 uint32_t start_time() { return start_time_; } |
| 209 |
208 ServerAddresses server_addresses_; | 210 ServerAddresses server_addresses_; |
209 ServerAddresses bind_request_succeeded_servers_; | 211 ServerAddresses bind_request_succeeded_servers_; |
210 ServerAddresses bind_request_failed_servers_; | 212 ServerAddresses bind_request_failed_servers_; |
211 StunRequestManager requests_; | 213 StunRequestManager requests_; |
212 rtc::AsyncPacketSocket* socket_; | 214 rtc::AsyncPacketSocket* socket_; |
213 int error_; | 215 int error_; |
214 rtc::scoped_ptr<AddressResolver> resolver_; | 216 rtc::scoped_ptr<AddressResolver> resolver_; |
215 bool ready_; | 217 bool ready_; |
216 int stun_keepalive_delay_; | 218 int stun_keepalive_delay_; |
| 219 uint32_t start_time_; |
217 | 220 |
218 // This is true by default and false when | 221 // This is true by default and false when |
219 // PORTALLOCATOR_DISABLE_DEFAULT_LOCAL_CANDIDATE is specified. | 222 // PORTALLOCATOR_DISABLE_DEFAULT_LOCAL_CANDIDATE is specified. |
220 bool emit_local_for_anyaddress_; | 223 bool emit_local_for_anyaddress_; |
221 | 224 |
222 friend class StunBindingRequest; | 225 friend class StunBindingRequest; |
223 }; | 226 }; |
224 | 227 |
225 class StunPort : public UDPPort { | 228 class StunPort : public UDPPort { |
226 public: | 229 public: |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 false) { | 277 false) { |
275 // UDPPort will set these to local udp, updating these to STUN. | 278 // UDPPort will set these to local udp, updating these to STUN. |
276 set_type(STUN_PORT_TYPE); | 279 set_type(STUN_PORT_TYPE); |
277 set_server_addresses(servers); | 280 set_server_addresses(servers); |
278 } | 281 } |
279 }; | 282 }; |
280 | 283 |
281 } // namespace cricket | 284 } // namespace cricket |
282 | 285 |
283 #endif // WEBRTC_P2P_BASE_STUNPORT_H_ | 286 #endif // WEBRTC_P2P_BASE_STUNPORT_H_ |
OLD | NEW |