Fwd: (so) ServerSocketChannel::supportedOptions includes IP_TOS
LINUS FERNANDES
linus.fernandes at gmail.com
Fri Jul 19 03:46:17 UTC 2019
---------- Forwarded message ---------
From: LINUS FERNANDES <linus.fernandes at gmail.com>
Date: Thu, 18 Jul 2019, 19:04
Subject: (so) ServerSocketChannel::supportedOptions includes IP_TOS
To: <nio-dev at openjdk.java.net>
http://mail.openjdk.java.net/pipermail/nio-dev/2018-August/005365.html
The above bug does not appear to have been resolved satisfactorily or I
don't have access to the fixed Java version.
import java.io.*;
import java.net.*;
import java.nio.channels.*;
public class OptionSupport {
public static void main(String[] args) throws IOException {
printOptions(SocketChannel.open());
printOptions(ServerSocketChannel.open());
printOptions(AsynchronousSocketChannel.open());
printOptions(AsynchronousServerSocketChannel.open());
printOptions(DatagramChannel.open());
}
private static void printOptions(NetworkChannel channel) throws
IOException {
System.out.println(channel.getClass().getSimpleName() + " supports:");
for (SocketOption<?> option : channel.supportedOptions()) {
System.out.println(option.name() + ": " + channel.getOption(option));
}
System.out.println();
channel.close();
}
}
Running the above program throws the same error for Openjdk:
java -version openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13)
OpenJDK 64-Bit Server VM (build 10.0.2+13, mixed mode)
The date of the JDK version is earlier than the resolution of the error.
https://bugs.openjdk.java.net/browse/JDK-8209152
I'm running Java on Arch Linux for Termux.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190719/798f4726/attachment.html>
More information about the nio-dev
mailing list