Package io.servicetalk.transport.api
Class ServiceTalkSocketOptions
- java.lang.Object
-
- io.servicetalk.transport.api.ServiceTalkSocketOptions
-
public final class ServiceTalkSocketOptions extends java.lang.Object
SocketOption
s that can be used besideStandardSocketOptions
.
-
-
Field Summary
Fields Modifier and Type Field Description static java.net.SocketOption<java.lang.Integer>
CONNECT_TIMEOUT
The connect timeout in milliseconds.static java.net.SocketOption<java.lang.Long>
IDLE_TIMEOUT
Allow to idle timeout in milli seconds after which the connection is closed.static java.net.SocketOption<java.lang.Integer>
SO_BACKLOG
The number of pending accepted connections for server sockets.static java.net.SocketOption<java.lang.Integer>
TCP_FASTOPEN_BACKLOG
The number of pending SYNs with data payload for server sockets as described in RFC 7413 Passive Open.static java.net.SocketOption<java.lang.Boolean>
TCP_FASTOPEN_CONNECT
Enable TCP fast open connect on the client side as described in RFC 7413 Active Open.static java.net.SocketOption<java.lang.Integer>
WRITE_BUFFER_THRESHOLD
The threshold after which the the Endpoint is not writable anymore.
-
-
-
Field Detail
-
CONNECT_TIMEOUT
public static final java.net.SocketOption<java.lang.Integer> CONNECT_TIMEOUT
The connect timeout in milliseconds.
-
WRITE_BUFFER_THRESHOLD
public static final java.net.SocketOption<java.lang.Integer> WRITE_BUFFER_THRESHOLD
The threshold after which the the Endpoint is not writable anymore.
-
IDLE_TIMEOUT
public static final java.net.SocketOption<java.lang.Long> IDLE_TIMEOUT
Allow to idle timeout in milli seconds after which the connection is closed.
-
TCP_FASTOPEN_CONNECT
public static final java.net.SocketOption<java.lang.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 java.net.SocketOption<java.lang.Integer> 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
public static final java.net.SocketOption<java.lang.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).
-
-