Package io.servicetalk.transport.api
Class ServiceTalkSocketOptions
java.lang.Object
io.servicetalk.transport.api.ServiceTalkSocketOptions
SocketOption
s that can be used beside StandardSocketOptions
.-
Field Summary
Modifier and TypeFieldDescriptionstatic final SocketOption<Integer>
Connect timeout in milliseconds.static final SocketOption<Long>
Connection idle timeout in milliseconds after which the connection is closed.static final SocketOption<Integer>
The number of pending accepted connections for server sockets.static final SocketOption<Integer>
The number of pending SYNs with data payload for server sockets as described in RFC 7413 Passive Open.static final SocketOption<Boolean>
Enable TCP fast open connect on the client side as described in RFC 7413 Active Open.static final SocketOption<Integer>
The threshold after which the Endpoint is not writable anymore. -
Method Summary
-
Field Details
-
CONNECT_TIMEOUT
Connect timeout in milliseconds. -
WRITE_BUFFER_THRESHOLD
The threshold after which the Endpoint is not writable anymore. -
IDLE_TIMEOUT
Connection idle timeout in milliseconds after which the connection is closed.0
disables idle timeout. -
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
The number of pending accepted connections for server sockets. For example this value is used for methods likeServerSocketChannel.bind(SocketAddress, int)
and listen(int sockfd, int backlog). -
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).
-