org.apache.http.config

## Class SocketConfig

- java.lang.Object
- - org.apache.http.config.SocketConfig

All Implemented Interfaces:
  Cloneable

    @Immutable
    public class SocketConfig
    extends Object
    implements Cloneable

Socket configuration.

Since:
  4.3

### Nested Class Summary

Nested Classes
`static class` `SocketConfig.Builder`

### Field Summary

Fields
`static SocketConfig` `DEFAULT`

### Method Summary

Methods
`protected SocketConfig` `clone()`
`static SocketConfig.Builder` `copy(SocketConfig config)`
`static SocketConfig.Builder` `custom()`
`int` `getSoLinger()` Determines the default value of the `SocketOptions.SO_LINGER` parameter for newly created sockets.
`int` `getSoTimeout()` Determines the default socket timeout value for non-blocking I/O operations.
`boolean` `isSoKeepAlive()` Determines the default value of the `SocketOptions.SO_KEEPALIVE` parameter for newly created sockets.
`boolean` `isSoReuseAddress()` Determines the default value of the `SocketOptions.SO_REUSEADDR` parameter for newly created sockets.
`boolean` `isTcpNoDelay()` Determines the default value of the `SocketOptions.TCP_NODELAY` parameter for newly created sockets.
`String` `toString()`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### DEFAULT

    public static final SocketConfig DEFAULT

### 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 CloneNotSupportedException

Overrides:
  `clone` in class `Object`
Throws:
  `CloneNotSupportedException`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### custom

    public static SocketConfig.Builder custom()

#### copy

    public static SocketConfig.Builder copy(SocketConfig config)