mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8233435: (dc) DatagramChannel should allow IPv6 socket join IPv4 multicast groups (macOS, win)
Reviewed-by: dfuchs
This commit is contained in:
parent
690b960c8f
commit
090dc51a4e
6 changed files with 185 additions and 66 deletions
|
@ -121,6 +121,14 @@ public class Net {
|
|||
return canJoin6WithIPv4Group0();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tells whether IPV6_XXX socket options should be used on an IPv6 socket
|
||||
* that is bound to an IPv4 address.
|
||||
*/
|
||||
static boolean canUseIPv6OptionsWithIPv4LocalAddress() {
|
||||
return canUseIPv6OptionsWithIPv4LocalAddress0();
|
||||
}
|
||||
|
||||
public static InetSocketAddress checkAddress(SocketAddress sa) {
|
||||
if (sa == null)
|
||||
throw new NullPointerException();
|
||||
|
@ -434,6 +442,8 @@ public class Net {
|
|||
|
||||
private static native boolean canJoin6WithIPv4Group0();
|
||||
|
||||
private static native boolean canUseIPv6OptionsWithIPv4LocalAddress0();
|
||||
|
||||
static FileDescriptor socket(boolean stream) throws IOException {
|
||||
return socket(UNSPEC, stream);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue