mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8194298: Add support for per Socket configuration of TCP keepalive
Reviewed-by: chegar, clanger, igerasim, alanb
This commit is contained in:
parent
611c72e5bc
commit
6a48db9cf6
20 changed files with 815 additions and 48 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -29,6 +29,7 @@ import java.io.FileDescriptor;
|
|||
import java.util.Set;
|
||||
import java.util.HashSet;
|
||||
import sun.net.ext.ExtendedSocketOptions;
|
||||
import static sun.net.ext.ExtendedSocketOptions.SOCK_STREAM;
|
||||
|
||||
/*
|
||||
* On Unix systems we simply delegate to native methods.
|
||||
|
@ -90,7 +91,7 @@ class PlainSocketImpl extends AbstractPlainSocketImpl
|
|||
|
||||
protected Set<SocketOption<?>> supportedOptions() {
|
||||
HashSet<SocketOption<?>> options = new HashSet<>(super.supportedOptions());
|
||||
addExtSocketOptions(extendedOptions.options(), options);
|
||||
addExtSocketOptions(ExtendedSocketOptions.options(SOCK_STREAM), options);
|
||||
return options;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue