org.apache.hc.core5.io

## Class SocketSupport

- java.lang.Object
- - org.apache.hc.core5.io.SocketSupport

-     @Internal
      public class SocketSupport
      extends Object

  Since:
    5.3

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `TCP_KEEPCOUNT`
    `static String` | `TCP_KEEPIDLE`
    `static String` | `TCP_KEEPINTERVAL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SocketSupport()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> SocketOption<T>` | `getExtendedSocketOptionOrNull(String fieldName)`
    `static <T> void` | `setOption(T object, String fieldName, T value)` Object can be ServerSocket or Socket.

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

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

- - ### Field Detail

    - #### TCP_KEEPIDLE

          public static final String TCP_KEEPIDLE

      See Also:
        Constant Field Values

    - #### TCP_KEEPINTERVAL

          public static final String TCP_KEEPINTERVAL

      See Also:
        Constant Field Values

    - #### TCP_KEEPCOUNT

          public static final String TCP_KEEPCOUNT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SocketSupport

          public SocketSupport()

  - ### Method Detail

    - #### getExtendedSocketOptionOrNull

          public static <T> SocketOption<T> getExtendedSocketOptionOrNull(String fieldName)

    - #### setOption

          public static <T> void setOption(T object,
                                           String fieldName,
                                           T value)
                                    throws IOException

      Object can be ServerSocket or Socket.
      Type Parameters:
        `T` - ServerSocket or Socket.
      Throws:
        `IOException` - in case of an I/O error.

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.