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

Unified Diff: webrtc/base/ipaddress.cc

Issue 1275703006: Bug 4517: Enable connectivity for demo page when no STUN/TURN specifiefd. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/ipaddress.h ('k') | webrtc/p2p/base/port_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/ipaddress.cc
diff --git a/webrtc/base/ipaddress.cc b/webrtc/base/ipaddress.cc
index 768a7092a3c797db17c86748cc15b9387cd3a1dd..3dd856a64abc817ac8de32d22e04a85ccaa74cab 100644
--- a/webrtc/base/ipaddress.cc
+++ b/webrtc/base/ipaddress.cc
@@ -498,4 +498,13 @@ int IPAddressPrecedence(const IPAddress& ip) {
return 0;
}
-} // Namespace talk base
+IPAddress GetLoopbackIP(int family) {
+ if (family == AF_INET) {
+ return rtc::IPAddress(INADDR_LOOPBACK);
+ }
+ if (family == AF_INET6) {
+ return rtc::IPAddress(in6addr_loopback);
+ }
+ return rtc::IPAddress();
+}
+} // Namespace rtc
« no previous file with comments | « webrtc/base/ipaddress.h ('k') | webrtc/p2p/base/port_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698