File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,19 @@ use log::{debug, warn};
2020
2121use super :: * ;
2222
23- /// A quick-and-dirty socket address that binds to a "default" interface.
23+ /// Socket address that binds to any IPv4-configured interface available
24+ pub const IPV4_DEFAULT_SOCKET : SocketAddr =
25+ SocketAddr :: new ( IpAddr :: V4 ( Ipv4Addr :: UNSPECIFIED ) , PORT ) ;
26+
27+ /// Socket address that binds to any IPv6-configured interface available on single-stack
28+ /// implementations and to any configured interface available on dual-stack implementations.
29+ pub const IPV6_DEFAULT_SOCKET : SocketAddr =
30+ SocketAddr :: new ( IpAddr :: V6 ( Ipv6Addr :: UNSPECIFIED ) , PORT ) ;
31+
32+ /// A quick-and-dirty socket address that binds to any interface available on dual-stack
33+ /// implementations.
2434/// Don't use in production code.
25- pub const DEFAULT_SOCKET : SocketAddr = SocketAddr :: new ( IpAddr :: V6 ( Ipv6Addr :: UNSPECIFIED ) , PORT ) ;
35+ pub const DEFAULT_SOCKET : SocketAddr = IPV6_DEFAULT_SOCKET ;
2636
2737/// The IPv4 mDNS broadcast address, as per spec.
2838pub const IP_BROADCAST_ADDR : Ipv4Addr = Ipv4Addr :: new ( 224 , 0 , 0 , 251 ) ;
You can’t perform that action at this time.
0 commit comments