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 #include "webrtc/p2p/base/stunport.h" | 11 #include "webrtc/p2p/base/stunport.h" |
12 | 12 |
13 #include "webrtc/p2p/base/common.h" | 13 #include "webrtc/p2p/base/common.h" |
14 #include "webrtc/p2p/base/portallocator.h" | 14 #include "webrtc/p2p/base/portallocator.h" |
15 #include "webrtc/p2p/base/stun.h" | 15 #include "webrtc/p2p/base/stun.h" |
16 #include "webrtc/base/checks.h" | 16 #include "webrtc/rtc_base/checks.h" |
17 #include "webrtc/base/helpers.h" | 17 #include "webrtc/rtc_base/helpers.h" |
18 #include "webrtc/base/ipaddress.h" | 18 #include "webrtc/rtc_base/ipaddress.h" |
19 #include "webrtc/base/logging.h" | 19 #include "webrtc/rtc_base/logging.h" |
20 #include "webrtc/base/nethelpers.h" | 20 #include "webrtc/rtc_base/nethelpers.h" |
21 | 21 |
22 namespace cricket { | 22 namespace cricket { |
23 | 23 |
24 // TODO: Move these to a common place (used in relayport too) | 24 // TODO: Move these to a common place (used in relayport too) |
25 const int KEEPALIVE_DELAY = 10 * 1000; // 10 seconds - sort timeouts | 25 const int KEEPALIVE_DELAY = 10 * 1000; // 10 seconds - sort timeouts |
26 const int RETRY_TIMEOUT = 50 * 1000; // 50 seconds | 26 const int RETRY_TIMEOUT = 50 * 1000; // 50 seconds |
27 | 27 |
28 // Handles a binding request sent to the STUN server. | 28 // Handles a binding request sent to the STUN server. |
29 class StunBindingRequest : public StunRequest { | 29 class StunBindingRequest : public StunRequest { |
30 public: | 30 public: |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 const std::vector<Candidate>& existing_candidates = Candidates(); | 510 const std::vector<Candidate>& existing_candidates = Candidates(); |
511 std::vector<Candidate>::const_iterator it = existing_candidates.begin(); | 511 std::vector<Candidate>::const_iterator it = existing_candidates.begin(); |
512 for (; it != existing_candidates.end(); ++it) { | 512 for (; it != existing_candidates.end(); ++it) { |
513 if (it->address() == addr) | 513 if (it->address() == addr) |
514 return true; | 514 return true; |
515 } | 515 } |
516 return false; | 516 return false; |
517 } | 517 } |
518 | 518 |
519 } // namespace cricket | 519 } // namespace cricket |
OLD | NEW |