Class SocketConfig

  • All Implemented Interfaces:
    java.lang.Cloneable

    @Immutable
    public class SocketConfig
    extends java.lang.Object
    implements java.lang.Cloneable
    Socket configuration.
    Since:
    4.3
    • Method Detail

      • getSoTimeout

        public int getSoTimeout()
        Determines the default socket timeout value for non-blocking I/O operations.

        Default: 0 (no timeout)

        See Also:
        SocketOptions.SO_TIMEOUT
      • isSoReuseAddress

        public boolean isSoReuseAddress()
        Determines the default value of the SocketOptions.SO_REUSEADDR parameter for newly created sockets.

        Default: false

        See Also:
        SocketOptions.SO_REUSEADDR
      • getSoLinger

        public int getSoLinger()
        Determines the default value of the SocketOptions.SO_LINGER parameter for newly created sockets.

        Default: -1

        See Also:
        SocketOptions.SO_LINGER
      • isSoKeepAlive

        public boolean isSoKeepAlive()
        Determines the default value of the SocketOptions.SO_KEEPALIVE parameter for newly created sockets.

        Default: -1

        See Also:
        SocketOptions.SO_KEEPALIVE
      • isTcpNoDelay

        public boolean isTcpNoDelay()
        Determines the default value of the SocketOptions.TCP_NODELAY parameter for newly created sockets.

        Default: false

        See Also:
        SocketOptions.TCP_NODELAY
      • clone

        protected SocketConfig clone()
                              throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object