Java Code Examples for sun.net.ExtendedOptionsImpl#flowSupported()

The following examples show how to use sun.net.ExtendedOptionsImpl#flowSupported() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SocketChannelImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
private static Set<SocketOption<?>> defaultOptions() {
    HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(8);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_KEEPALIVE);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.SO_LINGER);
    set.add(StandardSocketOptions.TCP_NODELAY);
    // additional options required by socket adaptor
    set.add(StandardSocketOptions.IP_TOS);
    set.add(ExtendedSocketOption.SO_OOBINLINE);
    if (ExtendedOptionsImpl.flowSupported()) {
        set.add(jdk.net.ExtendedSocketOptions.SO_FLOW_SLA);
    }
    return Collections.unmodifiableSet(set);
}
 
Example 2
Source File: SocketChannelImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private static Set<SocketOption<?>> defaultOptions() {
    HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(8);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_KEEPALIVE);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.SO_LINGER);
    set.add(StandardSocketOptions.TCP_NODELAY);
    // additional options required by socket adaptor
    set.add(StandardSocketOptions.IP_TOS);
    set.add(ExtendedSocketOption.SO_OOBINLINE);
    if (ExtendedOptionsImpl.flowSupported()) {
        set.add(jdk.net.ExtendedSocketOptions.SO_FLOW_SLA);
    }
    return Collections.unmodifiableSet(set);
}
 
Example 3
Source File: SocketChannelImpl.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
private static Set<SocketOption<?>> defaultOptions() {
    HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(8);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_KEEPALIVE);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.SO_LINGER);
    set.add(StandardSocketOptions.TCP_NODELAY);
    // additional options required by socket adaptor
    set.add(StandardSocketOptions.IP_TOS);
    set.add(ExtendedSocketOption.SO_OOBINLINE);
    if (ExtendedOptionsImpl.flowSupported()) {
        set.add(jdk.net.ExtendedSocketOptions.SO_FLOW_SLA);
    }
    return Collections.unmodifiableSet(set);
}
 
Example 4
Source File: SocketChannelImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private static Set<SocketOption<?>> defaultOptions() {
    HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(8);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_KEEPALIVE);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.SO_LINGER);
    set.add(StandardSocketOptions.TCP_NODELAY);
    // additional options required by socket adaptor
    set.add(StandardSocketOptions.IP_TOS);
    set.add(ExtendedSocketOption.SO_OOBINLINE);
    if (ExtendedOptionsImpl.flowSupported()) {
        set.add(jdk.net.ExtendedSocketOptions.SO_FLOW_SLA);
    }
    return Collections.unmodifiableSet(set);
}
 
Example 5
Source File: SocketChannelImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private static Set<SocketOption<?>> defaultOptions() {
    HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(8);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_KEEPALIVE);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.SO_LINGER);
    set.add(StandardSocketOptions.TCP_NODELAY);
    // additional options required by socket adaptor
    set.add(StandardSocketOptions.IP_TOS);
    set.add(ExtendedSocketOption.SO_OOBINLINE);
    if (ExtendedOptionsImpl.flowSupported()) {
        set.add(jdk.net.ExtendedSocketOptions.SO_FLOW_SLA);
    }
    return Collections.unmodifiableSet(set);
}
 
Example 6
Source File: AsynchronousSocketChannelImpl.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private static Set<SocketOption<?>> defaultOptions() {
    HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(5);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_KEEPALIVE);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.TCP_NODELAY);
    if (ExtendedOptionsImpl.flowSupported()) {
        set.add(jdk.net.ExtendedSocketOptions.SO_FLOW_SLA);
    }
    return Collections.unmodifiableSet(set);
}
 
Example 7
Source File: DatagramChannelImpl.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
private static Set<SocketOption<?>> defaultOptions() {
    HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(8);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.SO_BROADCAST);
    set.add(StandardSocketOptions.IP_TOS);
    set.add(StandardSocketOptions.IP_MULTICAST_IF);
    set.add(StandardSocketOptions.IP_MULTICAST_TTL);
    set.add(StandardSocketOptions.IP_MULTICAST_LOOP);
    if (ExtendedOptionsImpl.flowSupported()) {
        set.add(jdk.net.ExtendedSocketOptions.SO_FLOW_SLA);
    }
    return Collections.unmodifiableSet(set);
}
 
Example 8
Source File: DatagramChannelImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private static Set<SocketOption<?>> defaultOptions() {
    HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(8);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.SO_BROADCAST);
    set.add(StandardSocketOptions.IP_TOS);
    set.add(StandardSocketOptions.IP_MULTICAST_IF);
    set.add(StandardSocketOptions.IP_MULTICAST_TTL);
    set.add(StandardSocketOptions.IP_MULTICAST_LOOP);
    if (ExtendedOptionsImpl.flowSupported()) {
        set.add(jdk.net.ExtendedSocketOptions.SO_FLOW_SLA);
    }
    return Collections.unmodifiableSet(set);
}
 
Example 9
Source File: AsynchronousSocketChannelImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static Set<SocketOption<?>> defaultOptions() {
    HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(5);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_KEEPALIVE);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.TCP_NODELAY);
    if (ExtendedOptionsImpl.flowSupported()) {
        set.add(jdk.net.ExtendedSocketOptions.SO_FLOW_SLA);
    }
    return Collections.unmodifiableSet(set);
}
 
Example 10
Source File: AsynchronousSocketChannelImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private static Set<SocketOption<?>> defaultOptions() {
    HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(5);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_KEEPALIVE);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.TCP_NODELAY);
    if (ExtendedOptionsImpl.flowSupported()) {
        set.add(jdk.net.ExtendedSocketOptions.SO_FLOW_SLA);
    }
    return Collections.unmodifiableSet(set);
}
 
Example 11
Source File: AsynchronousSocketChannelImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private static Set<SocketOption<?>> defaultOptions() {
    HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(5);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_KEEPALIVE);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.TCP_NODELAY);
    if (ExtendedOptionsImpl.flowSupported()) {
        set.add(jdk.net.ExtendedSocketOptions.SO_FLOW_SLA);
    }
    return Collections.unmodifiableSet(set);
}
 
Example 12
Source File: DatagramChannelImpl.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
private static Set<SocketOption<?>> defaultOptions() {
    HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(8);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.SO_BROADCAST);
    set.add(StandardSocketOptions.IP_TOS);
    set.add(StandardSocketOptions.IP_MULTICAST_IF);
    set.add(StandardSocketOptions.IP_MULTICAST_TTL);
    set.add(StandardSocketOptions.IP_MULTICAST_LOOP);
    if (ExtendedOptionsImpl.flowSupported()) {
        set.add(jdk.net.ExtendedSocketOptions.SO_FLOW_SLA);
    }
    return Collections.unmodifiableSet(set);
}
 
Example 13
Source File: DatagramChannelImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static Set<SocketOption<?>> defaultOptions() {
    HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(8);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.SO_BROADCAST);
    set.add(StandardSocketOptions.IP_TOS);
    set.add(StandardSocketOptions.IP_MULTICAST_IF);
    set.add(StandardSocketOptions.IP_MULTICAST_TTL);
    set.add(StandardSocketOptions.IP_MULTICAST_LOOP);
    if (ExtendedOptionsImpl.flowSupported()) {
        set.add(jdk.net.ExtendedSocketOptions.SO_FLOW_SLA);
    }
    return Collections.unmodifiableSet(set);
}
 
Example 14
Source File: AsynchronousSocketChannelImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
private static Set<SocketOption<?>> defaultOptions() {
    HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(5);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_KEEPALIVE);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.TCP_NODELAY);
    if (ExtendedOptionsImpl.flowSupported()) {
        set.add(jdk.net.ExtendedSocketOptions.SO_FLOW_SLA);
    }
    return Collections.unmodifiableSet(set);
}
 
Example 15
Source File: DatagramChannelImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
private static Set<SocketOption<?>> defaultOptions() {
    HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(8);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.SO_BROADCAST);
    set.add(StandardSocketOptions.IP_TOS);
    set.add(StandardSocketOptions.IP_MULTICAST_IF);
    set.add(StandardSocketOptions.IP_MULTICAST_TTL);
    set.add(StandardSocketOptions.IP_MULTICAST_LOOP);
    if (ExtendedOptionsImpl.flowSupported()) {
        set.add(jdk.net.ExtendedSocketOptions.SO_FLOW_SLA);
    }
    return Collections.unmodifiableSet(set);
}
 
Example 16
Source File: Sockets.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
private static void initOptionSets() {
    boolean flowsupported = ExtendedOptionsImpl.flowSupported();

    // Socket

    Set<SocketOption<?>> set = new HashSet<>();
    set.add(StandardSocketOptions.SO_KEEPALIVE);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.SO_LINGER);
    set.add(StandardSocketOptions.IP_TOS);
    set.add(StandardSocketOptions.TCP_NODELAY);
    if (flowsupported) {
        set.add(ExtendedSocketOptions.SO_FLOW_SLA);
    }
    set = Collections.unmodifiableSet(set);
    options.put(Socket.class, set);

    // ServerSocket

    set = new HashSet<>();
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.IP_TOS);
    set = Collections.unmodifiableSet(set);
    options.put(ServerSocket.class, set);

    // DatagramSocket

    set = new HashSet<>();
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.IP_TOS);
    if (flowsupported) {
        set.add(ExtendedSocketOptions.SO_FLOW_SLA);
    }
    set = Collections.unmodifiableSet(set);
    options.put(DatagramSocket.class, set);

    // MulticastSocket

    set = new HashSet<>();
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.IP_TOS);
    set.add(StandardSocketOptions.IP_MULTICAST_IF);
    set.add(StandardSocketOptions.IP_MULTICAST_TTL);
    set.add(StandardSocketOptions.IP_MULTICAST_LOOP);
    if (flowsupported) {
        set.add(ExtendedSocketOptions.SO_FLOW_SLA);
    }
    set = Collections.unmodifiableSet(set);
    options.put(MulticastSocket.class, set);
}
 
Example 17
Source File: Sockets.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private static void initOptionSets() {
    boolean flowsupported = ExtendedOptionsImpl.flowSupported();

    // Socket

    Set<SocketOption<?>> set = new HashSet<>();
    set.add(StandardSocketOptions.SO_KEEPALIVE);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.SO_LINGER);
    set.add(StandardSocketOptions.IP_TOS);
    set.add(StandardSocketOptions.TCP_NODELAY);
    if (flowsupported) {
        set.add(ExtendedSocketOptions.SO_FLOW_SLA);
    }
    set = Collections.unmodifiableSet(set);
    options.put(Socket.class, set);

    // ServerSocket

    set = new HashSet<>();
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.IP_TOS);
    set = Collections.unmodifiableSet(set);
    options.put(ServerSocket.class, set);

    // DatagramSocket

    set = new HashSet<>();
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.IP_TOS);
    if (flowsupported) {
        set.add(ExtendedSocketOptions.SO_FLOW_SLA);
    }
    set = Collections.unmodifiableSet(set);
    options.put(DatagramSocket.class, set);

    // MulticastSocket

    set = new HashSet<>();
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.IP_TOS);
    set.add(StandardSocketOptions.IP_MULTICAST_IF);
    set.add(StandardSocketOptions.IP_MULTICAST_TTL);
    set.add(StandardSocketOptions.IP_MULTICAST_LOOP);
    if (flowsupported) {
        set.add(ExtendedSocketOptions.SO_FLOW_SLA);
    }
    set = Collections.unmodifiableSet(set);
    options.put(MulticastSocket.class, set);
}
 
Example 18
Source File: Sockets.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private static void initOptionSets() {
    boolean flowsupported = ExtendedOptionsImpl.flowSupported();

    // Socket

    Set<SocketOption<?>> set = new HashSet<>();
    set.add(StandardSocketOptions.SO_KEEPALIVE);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.SO_LINGER);
    set.add(StandardSocketOptions.IP_TOS);
    set.add(StandardSocketOptions.TCP_NODELAY);
    if (flowsupported) {
        set.add(ExtendedSocketOptions.SO_FLOW_SLA);
    }
    set = Collections.unmodifiableSet(set);
    options.put(Socket.class, set);

    // ServerSocket

    set = new HashSet<>();
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.IP_TOS);
    set = Collections.unmodifiableSet(set);
    options.put(ServerSocket.class, set);

    // DatagramSocket

    set = new HashSet<>();
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.IP_TOS);
    if (flowsupported) {
        set.add(ExtendedSocketOptions.SO_FLOW_SLA);
    }
    set = Collections.unmodifiableSet(set);
    options.put(DatagramSocket.class, set);

    // MulticastSocket

    set = new HashSet<>();
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.IP_TOS);
    set.add(StandardSocketOptions.IP_MULTICAST_IF);
    set.add(StandardSocketOptions.IP_MULTICAST_TTL);
    set.add(StandardSocketOptions.IP_MULTICAST_LOOP);
    if (flowsupported) {
        set.add(ExtendedSocketOptions.SO_FLOW_SLA);
    }
    set = Collections.unmodifiableSet(set);
    options.put(MulticastSocket.class, set);
}
 
Example 19
Source File: Sockets.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private static void initOptionSets() {
    boolean flowsupported = ExtendedOptionsImpl.flowSupported();

    // Socket

    Set<SocketOption<?>> set = new HashSet<>();
    set.add(StandardSocketOptions.SO_KEEPALIVE);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.SO_LINGER);
    set.add(StandardSocketOptions.IP_TOS);
    set.add(StandardSocketOptions.TCP_NODELAY);
    if (flowsupported) {
        set.add(ExtendedSocketOptions.SO_FLOW_SLA);
    }
    set = Collections.unmodifiableSet(set);
    options.put(Socket.class, set);

    // ServerSocket

    set = new HashSet<>();
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.IP_TOS);
    set = Collections.unmodifiableSet(set);
    options.put(ServerSocket.class, set);

    // DatagramSocket

    set = new HashSet<>();
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.IP_TOS);
    if (flowsupported) {
        set.add(ExtendedSocketOptions.SO_FLOW_SLA);
    }
    set = Collections.unmodifiableSet(set);
    options.put(DatagramSocket.class, set);

    // MulticastSocket

    set = new HashSet<>();
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.IP_TOS);
    set.add(StandardSocketOptions.IP_MULTICAST_IF);
    set.add(StandardSocketOptions.IP_MULTICAST_TTL);
    set.add(StandardSocketOptions.IP_MULTICAST_LOOP);
    if (flowsupported) {
        set.add(ExtendedSocketOptions.SO_FLOW_SLA);
    }
    set = Collections.unmodifiableSet(set);
    options.put(MulticastSocket.class, set);
}
 
Example 20
Source File: Sockets.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
private static void initOptionSets() {
    boolean flowsupported = ExtendedOptionsImpl.flowSupported();

    // Socket

    Set<SocketOption<?>> set = new HashSet<>();
    set.add(StandardSocketOptions.SO_KEEPALIVE);
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.SO_LINGER);
    set.add(StandardSocketOptions.IP_TOS);
    set.add(StandardSocketOptions.TCP_NODELAY);
    if (flowsupported) {
        set.add(ExtendedSocketOptions.SO_FLOW_SLA);
    }
    set = Collections.unmodifiableSet(set);
    options.put(Socket.class, set);

    // ServerSocket

    set = new HashSet<>();
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.IP_TOS);
    set = Collections.unmodifiableSet(set);
    options.put(ServerSocket.class, set);

    // DatagramSocket

    set = new HashSet<>();
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.IP_TOS);
    if (flowsupported) {
        set.add(ExtendedSocketOptions.SO_FLOW_SLA);
    }
    set = Collections.unmodifiableSet(set);
    options.put(DatagramSocket.class, set);

    // MulticastSocket

    set = new HashSet<>();
    set.add(StandardSocketOptions.SO_SNDBUF);
    set.add(StandardSocketOptions.SO_RCVBUF);
    set.add(StandardSocketOptions.SO_REUSEADDR);
    set.add(StandardSocketOptions.IP_TOS);
    set.add(StandardSocketOptions.IP_MULTICAST_IF);
    set.add(StandardSocketOptions.IP_MULTICAST_TTL);
    set.add(StandardSocketOptions.IP_MULTICAST_LOOP);
    if (flowsupported) {
        set.add(ExtendedSocketOptions.SO_FLOW_SLA);
    }
    set = Collections.unmodifiableSet(set);
    options.put(MulticastSocket.class, set);
}