Uses of Interface
java.net.SocketOption
Packages that useSocketOption
Package
Description
A Java API for Stream Control Transport Protocol.
Provides the classes for implementing networking applications.
Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations.
Platform specific socket options for the
java.net andjava.nio.channels socket classes.Uses ofSocketOption incom.sun.nio.sctp
Subinterfaces ofSocketOption incom.sun.nio.sctpModifier and TypeInterfaceDescriptioninterfaceA socket option associated with an SCTP channel.Uses ofSocketOption injava.net
Fields injava.net declared asSocketOptionModifier and TypeFieldDescriptionstatic finalSocketOption<NetworkInterface> StandardSocketOptions.IP_MULTICAST_IFThe network interface for Internet Protocol (IP) multicast datagrams.static finalSocketOption<Boolean> StandardSocketOptions.IP_MULTICAST_LOOPLoopback for Internet Protocol (IP) multicast datagrams.static finalSocketOption<Integer> StandardSocketOptions.IP_MULTICAST_TTLThetime-to-live for Internet Protocol (IP) multicast datagrams.static finalSocketOption<Integer> StandardSocketOptions.IP_TOSThe Type of Service (ToS) octet in the Internet Protocol (IP) header.static finalSocketOption<Boolean> StandardSocketOptions.SO_BROADCASTAllow transmission of broadcast datagrams.static finalSocketOption<Boolean> StandardSocketOptions.SO_KEEPALIVEKeep connection alive.static finalSocketOption<Integer> StandardSocketOptions.SO_LINGERLinger on close if data is present.static finalSocketOption<Integer> StandardSocketOptions.SO_RCVBUFThe size of the socket receive buffer.static finalSocketOption<Boolean> StandardSocketOptions.SO_REUSEADDRRe-use address.static finalSocketOption<Boolean> StandardSocketOptions.SO_REUSEPORTRe-use port.static finalSocketOption<Integer> StandardSocketOptions.SO_SNDBUFThe size of the socket send buffer.static finalSocketOption<Boolean> StandardSocketOptions.TCP_NODELAYDisable the Nagle algorithm.Methods injava.net that return types with arguments of typeSocketOptionModifier and TypeMethodDescriptionSet<SocketOption<?>> DatagramSocket.supportedOptions()Returns a set of the socket options supported by this socket.protectedSet<SocketOption<?>> DatagramSocketImpl.supportedOptions()Returns a set of SocketOptions supported by this impl and by this impl's socket (DatagramSocket or MulticastSocket)Set<SocketOption<?>> ServerSocket.supportedOptions()Returns a set of the socket options supported by this server socket.Set<SocketOption<?>> Socket.supportedOptions()Returns a set of the socket options supported by this socket.protectedSet<SocketOption<?>> SocketImpl.supportedOptions()Returns a set of SocketOptions supported by this impl and by this impl's socket (Socket or ServerSocket)Methods injava.net with parameters of typeSocketOptionModifier and TypeMethodDescription<T> TDatagramSocket.getOption(SocketOption<T> name) Returns the value of a socket option.protected <T> TDatagramSocketImpl.getOption(SocketOption<T> name) Called to get a socket option.<T> TServerSocket.getOption(SocketOption<T> name) Returns the value of a socket option.<T> TSocket.getOption(SocketOption<T> name) Returns the value of a socket option.protected <T> TSocketImpl.getOption(SocketOption<T> name) Called to get a socket option.<T> DatagramSocketDatagramSocket.setOption(SocketOption<T> name, T value) Sets the value of a socket option.protected <T> voidDatagramSocketImpl.setOption(SocketOption<T> name, T value) Called to set a socket option.<T> ServerSocketServerSocket.setOption(SocketOption<T> name, T value) Sets the value of a socket option.<T> SocketSocket.setOption(SocketOption<T> name, T value) Sets the value of a socket option.protected <T> voidSocketImpl.setOption(SocketOption<T> name, T value) Called to set a socket option.Uses ofSocketOption injava.nio.channels
Methods injava.nio.channels that return types with arguments of typeSocketOptionModifier and TypeMethodDescriptionSet<SocketOption<?>> NetworkChannel.supportedOptions()Returns a set of the socket options supported by this channel.Methods injava.nio.channels with parameters of typeSocketOptionModifier and TypeMethodDescription<T> TNetworkChannel.getOption(SocketOption<T> name) Returns the value of a socket option.abstract <T> AsynchronousServerSocketChannelAsynchronousServerSocketChannel.setOption(SocketOption<T> name, T value) abstract <T> AsynchronousSocketChannelAsynchronousSocketChannel.setOption(SocketOption<T> name, T value) abstract <T> DatagramChannelDatagramChannel.setOption(SocketOption<T> name, T value) <T> NetworkChannelNetworkChannel.setOption(SocketOption<T> name, T value) Sets the value of a socket option.abstract <T> ServerSocketChannelServerSocketChannel.setOption(SocketOption<T> name, T value) abstract <T> SocketChannelSocketChannel.setOption(SocketOption<T> name, T value) Uses ofSocketOption injdk.net
Fields injdk.net declared asSocketOptionModifier and TypeFieldDescriptionstatic finalSocketOption<Boolean> ExtendedSocketOptions.IP_DONTFRAGMENTDisable IP packet fragmentation.static finalSocketOption<Integer> ExtendedSocketOptions.SO_INCOMING_NAPI_IDIdentifies the receive queue that the last incoming packet for the socket was received on.static finalSocketOption<UnixDomainPrincipal> ExtendedSocketOptions.SO_PEERCREDUnix Domain peer credentials.static finalSocketOption<Integer> ExtendedSocketOptions.TCP_KEEPCOUNTKeep-Alive retransmission maximum limit.static finalSocketOption<Integer> ExtendedSocketOptions.TCP_KEEPIDLEKeep-Alive idle time.static finalSocketOption<Integer> ExtendedSocketOptions.TCP_KEEPINTERVALKeep-Alive retransmission interval time.static finalSocketOption<Boolean> ExtendedSocketOptions.TCP_QUICKACKDisable Delayed Acknowledgements.Methods injdk.net that return types with arguments of typeSocketOptionModifier and TypeMethodDescriptionstaticSet<SocketOption<?>> Sockets.supportedOptions(Class<?> socketType) Deprecated, for removal: This API element is subject to removal in a future version.Methods injdk.net with parameters of typeSocketOptionModifier and TypeMethodDescriptionstatic <T> TSockets.getOption(DatagramSocket s,SocketOption<T> name) Deprecated.useDatagramSocket.getOption(SocketOption)instead.static <T> TSockets.getOption(ServerSocket s,SocketOption<T> name) Deprecated.useServerSocket.getOption(SocketOption)instead.static <T> TSockets.getOption(Socket s,SocketOption<T> name) Deprecated.useSocket.getOption(SocketOption)instead.static <T> voidSockets.setOption(DatagramSocket s,SocketOption<T> name, T value) Deprecated.useDatagramSocket.setOption(SocketOption, Object)instead.static <T> voidSockets.setOption(ServerSocket s,SocketOption<T> name, T value) Deprecated.useServerSocket.setOption(SocketOption, Object)instead.static <T> voidSockets.setOption(Socket s,SocketOption<T> name, T value) Deprecated.useSocket.setOption(SocketOption, Object)instead.