Class ServiceTalkSocketOptions

java.lang.Object
io.servicetalk.transport.api.ServiceTalkSocketOptions

public final class ServiceTalkSocketOptions extends Object
SocketOptions that can be used beside StandardSocketOptions.
  • Field Details

    • CONNECT_TIMEOUT

      public static final SocketOption<Integer> CONNECT_TIMEOUT
      Connect timeout in milliseconds.
    • WRITE_BUFFER_THRESHOLD

      public static final SocketOption<Integer> WRITE_BUFFER_THRESHOLD
      The threshold after which the Endpoint is not writable anymore.
    • IDLE_TIMEOUT

      public static final SocketOption<Long> IDLE_TIMEOUT
      Connection idle timeout in milliseconds after which the connection is closed. 0 disables idle timeout.
    • TCP_FASTOPEN_CONNECT

      public static final SocketOption<Boolean> TCP_FASTOPEN_CONNECT
      Enable TCP fast open connect on the client side as described in RFC 7413 Active Open.

      Note the following caveats of this option:

      • it may not be supported by the underlying transport (e.g. supported by Netty's linux EPOLL transport)
      • the data that is written in TFO must be idempotent (see LWN article for more info). The TLS client_hello is idempotent and this option is therefore safe to use with TLS.
      • data must be written before attempting to connect the socket (clarifies data is idempotent)
    • SO_BACKLOG

      public static final SocketOption<Integer> SO_BACKLOG
      The number of pending accepted connections for server sockets. For example this value is used for methods like ServerSocketChannel.bind(SocketAddress, int) and listen(int sockfd, int backlog).
    • TCP_FASTOPEN_BACKLOG

      public static final SocketOption<Integer> TCP_FASTOPEN_BACKLOG
      The number of pending SYNs with data payload for server sockets as described in RFC 7413 Passive Open.

      Note this option may not be supported by the underlying transport (e.g. supported by Netty's linux EPOLL transport).