Module jdk.net
Package jdk.net

Class Sockets

java.lang.Object
jdk.net.Sockets

@Deprecated(since="16") public class Sockets extends Object
Deprecated.
Java SE 9 added standard methods to set/get socket options, and retrieve the per-Socket supported options effectively rendering this API redundant. Please refer to the corresponding socket's class for the equivalent method to set/get a socket option or retrieve available socket options.
Defines static methods to set and get socket options defined by the SocketOption interface. All of the standard options defined by Socket, ServerSocket, and DatagramSocket can be set this way, as well as additional or platform specific options supported by each socket type.

The supportedOptions(Class) method can be called to determine the complete set of options available (per socket type) on the current system.

When a security manager is installed, some non-standard socket options may require a security permission before being set or get. The details are specified in ExtendedSocketOptions. No permission is required for StandardSocketOptions.

Since:
1.8
See Also: