| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2  *  Copyright 2012 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 42   } | 42   } | 
| 43 | 43 | 
| 44  private: | 44  private: | 
| 45   const std::vector<rtc::SocketAddress>& alternate_server_addresses_; | 45   const std::vector<rtc::SocketAddress>& alternate_server_addresses_; | 
| 46   std::vector<rtc::SocketAddress>::const_iterator iter_; | 46   std::vector<rtc::SocketAddress>::const_iterator iter_; | 
| 47 }; | 47 }; | 
| 48 | 48 | 
| 49 class TestTurnServer : public TurnAuthInterface { | 49 class TestTurnServer : public TurnAuthInterface { | 
| 50  public: | 50  public: | 
| 51   TestTurnServer(rtc::Thread* thread, | 51   TestTurnServer(rtc::Thread* thread, | 
| 52                  const rtc::SocketAddress& udp_int_addr, | 52                  const rtc::SocketAddress& int_addr, | 
| 53                  const rtc::SocketAddress& udp_ext_addr) | 53                  const rtc::SocketAddress& udp_ext_addr, | 
|  | 54                  ProtocolType int_protocol = PROTO_UDP) | 
| 54       : server_(thread) { | 55       : server_(thread) { | 
| 55     AddInternalSocket(udp_int_addr, cricket::PROTO_UDP); | 56     AddInternalSocket(int_addr, int_protocol); | 
| 56     server_.SetExternalSocketFactory(new rtc::BasicPacketSocketFactory(), | 57     server_.SetExternalSocketFactory(new rtc::BasicPacketSocketFactory(), | 
| 57         udp_ext_addr); | 58         udp_ext_addr); | 
| 58     server_.set_realm(kTestRealm); | 59     server_.set_realm(kTestRealm); | 
| 59     server_.set_software(kTestSoftware); | 60     server_.set_software(kTestSoftware); | 
| 60     server_.set_auth_hook(this); | 61     server_.set_auth_hook(this); | 
| 61   } | 62   } | 
| 62 | 63 | 
| 63   void set_enable_otu_nonce(bool enable) { | 64   void set_enable_otu_nonce(bool enable) { | 
| 64     server_.set_enable_otu_nonce(enable); | 65     server_.set_enable_otu_nonce(enable); | 
| 65   } | 66   } | 
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 107                       std::string* key) { | 108                       std::string* key) { | 
| 108     return ComputeStunCredentialHash(username, realm, username, key); | 109     return ComputeStunCredentialHash(username, realm, username, key); | 
| 109   } | 110   } | 
| 110 | 111 | 
| 111   TurnServer server_; | 112   TurnServer server_; | 
| 112 }; | 113 }; | 
| 113 | 114 | 
| 114 }  // namespace cricket | 115 }  // namespace cricket | 
| 115 | 116 | 
| 116 #endif  // WEBRTC_P2P_BASE_TESTTURNSERVER_H_ | 117 #endif  // WEBRTC_P2P_BASE_TESTTURNSERVER_H_ | 
| OLD | NEW | 
|---|