Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: webrtc/p2p/base/stunport.h

Issue 1437933002: Fix a bug when we can't get default address (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: fix comments Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/base/network.h ('k') | webrtc/p2p/base/stunport.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 const rtc::SentPacket& sent_packet); 142 const rtc::SentPacket& sent_packet);
143 143
144 void OnReadyToSend(rtc::AsyncPacketSocket* socket); 144 void OnReadyToSend(rtc::AsyncPacketSocket* socket);
145 145
146 // This method will send STUN binding request if STUN server address is set. 146 // This method will send STUN binding request if STUN server address is set.
147 void MaybePrepareStunCandidate(); 147 void MaybePrepareStunCandidate();
148 148
149 void SendStunBindingRequests(); 149 void SendStunBindingRequests();
150 150
151 // Helper function which will set |addr|'s IP to the default local address if 151 // Helper function which will set |addr|'s IP to the default local address if
152 // |addr| is the "any" address and |emit_local_for_anyaddress_| is true. 152 // |addr| is the "any" address and |emit_local_for_anyaddress_| is true. When
153 void MaybeSetDefaultLocalAddress(rtc::SocketAddress* addr) const; 153 // returning false, it indicates that the operation has failed and the
154 // address shouldn't be used by any candidate.
155 bool MaybeSetDefaultLocalAddress(rtc::SocketAddress* addr) const;
154 156
155 private: 157 private:
156 // A helper class which can be called repeatedly to resolve multiple 158 // A helper class which can be called repeatedly to resolve multiple
157 // addresses, as opposed to rtc::AsyncResolverInterface, which can only 159 // addresses, as opposed to rtc::AsyncResolverInterface, which can only
158 // resolve one address per instance. 160 // resolve one address per instance.
159 class AddressResolver : public sigslot::has_slots<> { 161 class AddressResolver : public sigslot::has_slots<> {
160 public: 162 public:
161 explicit AddressResolver(rtc::PacketSocketFactory* factory); 163 explicit AddressResolver(rtc::PacketSocketFactory* factory);
162 ~AddressResolver(); 164 ~AddressResolver();
163 165
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 false) { 274 false) {
273 // UDPPort will set these to local udp, updating these to STUN. 275 // UDPPort will set these to local udp, updating these to STUN.
274 set_type(STUN_PORT_TYPE); 276 set_type(STUN_PORT_TYPE);
275 set_server_addresses(servers); 277 set_server_addresses(servers);
276 } 278 }
277 }; 279 };
278 280
279 } // namespace cricket 281 } // namespace cricket
280 282
281 #endif // WEBRTC_P2P_BASE_STUNPORT_H_ 283 #endif // WEBRTC_P2P_BASE_STUNPORT_H_
OLDNEW
« no previous file with comments | « webrtc/base/network.h ('k') | webrtc/p2p/base/stunport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698