Add ability to set kAnyV6 on Cast Environment

Currently, we can only set the cast environment to bind to any V4 UDP
socket. This patch allows the embedder to select IPv4 or IPv6.

Bug: b/158579466
Change-Id: I3f78ca09f4f4afe0441b88876d03045d9d21a5f4
Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2237090
Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
Commit-Queue: Jordan Bayles <jophba@chromium.org>
diff --git a/cast/streaming/environment.h b/cast/streaming/environment.h
index 1be25e9..56663d6 100644
--- a/cast/streaming/environment.h
+++ b/cast/streaming/environment.h
@@ -39,7 +39,7 @@
   // socket is bound on, they may omit that argument.
   Environment(ClockNowFunctionPtr now_function,
               TaskRunner* task_runner,
-              const IPEndpoint& local_endpoint = IPEndpoint::kAny);
+              const IPEndpoint& local_endpoint = IPEndpoint::kAnyV6);
 
   ~Environment() override;
 
diff --git a/platform/base/ip_address.cc b/platform/base/ip_address.cc
index fb85f81..da624a8 100644
--- a/platform/base/ip_address.cc
+++ b/platform/base/ip_address.cc
@@ -19,6 +19,12 @@
 namespace openscreen {
 
 // static
+const IPAddress IPAddress::kAnyV4{0, 0, 0, 0};
+
+// static
+const IPAddress IPAddress::kAnyV6{0, 0, 0, 0, 0, 0, 0, 0};
+
+// static
 const IPAddress IPAddress::kV4LoopbackAddress{127, 0, 0, 1};
 
 // static
@@ -215,7 +221,10 @@
 }
 
 // static
-constexpr const IPEndpoint IPEndpoint::kAny{};
+const IPEndpoint IPEndpoint::kAnyV4{IPAddress::kAnyV4, 0};
+
+// static
+const IPEndpoint IPEndpoint::kAnyV6{IPAddress::kAnyV6, 0};
 
 IPEndpoint::operator bool() const {
   return address || port;
diff --git a/platform/base/ip_address.h b/platform/base/ip_address.h
index bf28293..807784e 100644
--- a/platform/base/ip_address.h
+++ b/platform/base/ip_address.h
@@ -22,9 +22,10 @@
     kV6,
   };
 
+  static const IPAddress kAnyV4;
+  static const IPAddress kAnyV6;
   static const IPAddress kV4LoopbackAddress;
   static const IPAddress kV6LoopbackAddress;
-
   static constexpr size_t kV4Size = 4;
   static constexpr size_t kV6Size = 16;
 
@@ -99,7 +100,8 @@
   uint16_t port = 0;
 
   // Used with various socket types to indicate "any" address.
-  static const IPEndpoint kAny;
+  static const IPEndpoint kAnyV4;
+  static const IPEndpoint kAnyV6;
   explicit operator bool() const;
 
   // Parses a text representation of an IPv4/IPv6 address and port (e.g.