8194298: Add support for per Socket configuration of TCP keepalive

Reviewed-by: chegar, clanger, igerasim, alanb
This commit is contained in:
Vyom Tewari 2018-05-30 16:36:35 +05:30
parent 611c72e5bc
commit 6a48db9cf6
20 changed files with 815 additions and 48 deletions

View file

@ -49,6 +49,8 @@ import java.util.Set;
import java.util.concurrent.locks.ReentrantLock;
import sun.net.NetHooks;
import sun.net.ext.ExtendedSocketOptions;
import static sun.net.ext.ExtendedSocketOptions.SOCK_STREAM;
/**
* An implementation of ServerSocketChannels
@ -199,6 +201,7 @@ class ServerSocketChannelImpl
set.add(StandardSocketOptions.SO_REUSEPORT);
}
set.add(StandardSocketOptions.IP_TOS);
set.addAll(ExtendedSocketOptions.options(SOCK_STREAM));
return Collections.unmodifiableSet(set);
}
}