Module jdk.net
Package jdk.net

Class Sockets


  • public class Sockets
    extends Object
    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.

    See Also:
    NetworkChannel