< prev index next >
src/java.base/windows/classes/sun/nio/ch/SinkChannelImpl.java
Print this page
@@ -28,10 +28,11 @@
package sun.nio.ch;
import java.io.IOException;
import java.io.FileDescriptor;
+import java.net.StandardSocketOptions;
import java.nio.ByteBuffer;
import java.nio.channels.*;
import java.nio.channels.spi.*;
@@ -52,10 +53,17 @@
public int getFDVal() {
return ((SocketChannelImpl)sc).getFDVal();
}
+ void setNoDelay() throws IOException {
+ if (sc instanceof InetSocketChannelImpl) {
+ InetSocketChannelImpl isc = (InetSocketChannelImpl)sc;
+ isc.setOption(StandardSocketOptions.TCP_NODELAY, true);
+ }
+ }
+
SinkChannelImpl(SelectorProvider sp, SocketChannel sc) {
super(sp);
this.sc = sc;
}
< prev index next >