Add support for the SO_INCOMING_NAPI_ID socket option to jdk.net.ExtendedSocketOptions
Co-authored-by: Dinesh Kumar <dinesh.kumar@intel.com>
Reviewed-by: alanb, chegar, dfuchs, vtewari, pconcannon
Replace the underlying implementations of the java.net.DatagramSocket and java.net.MulticastSocket APIs with simpler and more modern implementations that are easy to maintain and debug.
Co-authored-by: Alan Bateman <alan.bateman@oracle.com>
Co-authored-by: Chris Hegarty <chris.hegarty@oracle.com>
Co-authored-by: Daniel Fuchs <daniel.fuchs@oracle.com>
Reviewed-by: alanb, chegar, dfuchs
The test java.net.httpclient.websocket.WSHandshakeExceptionTest.java checks that the websocket client handles invalid utf-8 sent by the websocket server
Reviewed-by: dfuchs
The fix updates jdk.internal.net.http.websocket. OpeningHandshake.send() method to process the response body from server
Reviewed-by: chegar, dfuchs, prappo
Tests added for methods: setSendBufferSize(int), getSendBufferSize(), and getReceieveBufferSize() to increase test coverage in the DatagramSocket class
Reviewed-by: alanb, chegar, dfuchs
This fix adds a check for port == 0 to MulticastSocket's 2-arg send method to ensure a consistent exception is thrown across platforms
Reviewed-by: dfuchs
This fix changes the default port of a DatagramPacket from -1 to 0, which changes the behaviour of calling getSocketAddress with no port set from throwing an IAE to returning an InetSocketAddress representing any local address with port 0.
Reviewed-by: alanb, chegar, dfuchs
8239595: ssl context version is not respected
The java.net.HttpClient is updated to no longer override any default selected protocols in the SSLContext, in the absence of any SSLParameters explicitly supplied to the HttpClient.builder.
Reviewed-by: chegar, dfuchs
DefaultInetrface.getDefault is updated to prefer interfaces that have non link-local addresses. NetworkConfiguration is updated to skip interface that have only link-local addresses, whether IPv4 or IPv6, for multicasting.
Reviewed-by: chegar, alanb
The fix updates the incorrect example of the usage of the class java.net.http.HttpResponse.BodySubscribers.
Reviewed-by: chegar, dfuchs, jboes, pconcannon
The solaris specific code is changed to use the fallback mechanism if the DLPI interface returns an error indicating that the operation is unsupported. In addition, NetworkInterface::getHardwareAddress is changed to always return null for the loopback interface.
Reviewed-by: alanb
Updates DatagramChannel so that the SO_SNDBUF is set to a minimum value of 65527 for IPv6 sockets and 65507 for IPv4 sockets on macOS.
Reviewed-by: alanb, dfuchs
The test assumed that ByteBuffer would be split at long boundaries. This is obviously not always the case. A carry has been added to support reading a long split over several buffers.
Reviewed-by: chegar
The SSLTube and SSLFlowDelegate are improved to wrap any non-SSL exception that occur during the handshake in an SSLHandshakeException.
Reviewed-by: chegar
DatagramSocket and MulticastSocket changed to throw IllegalArgumentException if not connected and passed a packet containing a port out of range
Reviewed-by: chegar, dfuchs
This change fixes several issues with WebSocket and proxy authentication. The AuthenticationFilter is changed to support an authenticating server accessed through an authenticating proxy. MultiExchange is fixed to close the previous connection if a new connection is necessary to establish the websocket (websocket connections are not cached and must be closed in that case). WebSocket OpeningHandshake is fixed to close the connection (without creating the RawChannel) if the opening handshake doesn't result in 101 upgrade protocol.
Reviewed-by: prappo, chegar
The MulticastSocket method getOption has been changed to conform to the behavior described in StandardSocketOptions.IP_MULTICAST_IF.
Reviewed-by: chegar, dfuchs