< prev index next >
src/java.base/share/classes/jdk/net/Sockets.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2014, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2014, 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 251,260 ****
--- 251,261 ----
}
}
private static void initOptionSets() {
boolean flowsupported = ExtendedOptionsImpl.flowSupported();
+ boolean quickAckSupported = ExtendedOptionsImpl.isQuickAckAvailable();
// Socket
Set<SocketOption<?>> set = new HashSet<>();
set.add(StandardSocketOptions.SO_KEEPALIVE);
*** 265,274 ****
--- 266,278 ----
set.add(StandardSocketOptions.IP_TOS);
set.add(StandardSocketOptions.TCP_NODELAY);
if (flowsupported) {
set.add(ExtendedSocketOptions.SO_FLOW_SLA);
}
+ if (quickAckSupported) {
+ set.add(ExtendedSocketOptions.SO_QUICKACK);
+ }
set = Collections.unmodifiableSet(set);
options.put(Socket.class, set);
// ServerSocket
*** 287,296 ****
--- 291,303 ----
set.add(StandardSocketOptions.SO_REUSEADDR);
set.add(StandardSocketOptions.IP_TOS);
if (flowsupported) {
set.add(ExtendedSocketOptions.SO_FLOW_SLA);
}
+ if (quickAckSupported) {
+ set.add(ExtendedSocketOptions.SO_QUICKACK);
+ }
set = Collections.unmodifiableSet(set);
options.put(DatagramSocket.class, set);
// MulticastSocket
*** 303,311 ****
--- 310,321 ----
set.add(StandardSocketOptions.IP_MULTICAST_TTL);
set.add(StandardSocketOptions.IP_MULTICAST_LOOP);
if (flowsupported) {
set.add(ExtendedSocketOptions.SO_FLOW_SLA);
}
+ if (quickAckSupported) {
+ set.add(ExtendedSocketOptions.SO_QUICKACK);
+ }
set = Collections.unmodifiableSet(set);
options.put(MulticastSocket.class, set);
}
}
< prev index next >