src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java
Print this page
rev 14282 : 8044773: Refactor jdk.net API so that it can be moved out of the base module
Reviewed-by:
*** 37,47 ****
import java.util.HashSet;
import java.util.Collections;
import java.util.concurrent.*;
import java.util.concurrent.locks.*;
import sun.net.NetHooks;
! import sun.net.ExtendedOptionsImpl;
/**
* Base implementation of AsynchronousSocketChannel
*/
--- 37,47 ----
import java.util.HashSet;
import java.util.Collections;
import java.util.concurrent.*;
import java.util.concurrent.locks.*;
import sun.net.NetHooks;
! import sun.net.ext.ExtendedSocketOptions;
/**
* Base implementation of AsynchronousSocketChannel
*/
*** 510,522 ****
set.add(StandardSocketOptions.SO_REUSEADDR);
if (Net.isReusePortAvailable()) {
set.add(StandardSocketOptions.SO_REUSEPORT);
}
set.add(StandardSocketOptions.TCP_NODELAY);
! if (ExtendedOptionsImpl.flowSupported()) {
! set.add(jdk.net.ExtendedSocketOptions.SO_FLOW_SLA);
! }
return Collections.unmodifiableSet(set);
}
}
@Override
--- 510,522 ----
set.add(StandardSocketOptions.SO_REUSEADDR);
if (Net.isReusePortAvailable()) {
set.add(StandardSocketOptions.SO_REUSEPORT);
}
set.add(StandardSocketOptions.TCP_NODELAY);
! ExtendedSocketOptions extendedOptions =
! ExtendedSocketOptions.getInstance();
! set.addAll(extendedOptions.options());
return Collections.unmodifiableSet(set);
}
}
@Override