TcpSslOptions

Base class. TCP and SSL related options

@author <a href="http://tfox.org">Tim Fox</a>

class TcpSslOptions : NetworkOptions {}

Constructors

this
this()

Default constructor

this
this(TcpSslOptions other)

Copy constructor

Members

Functions

getIdleTimeout
Duration getIdleTimeout()

@return the idle timeout, in time unit specified by {@link #getIdleTimeoutUnit()}.

getKeepaliveInterval
Duration getKeepaliveInterval()
Undocumented in source. Be warned that the author may not have intended to support it.
getKeepaliveProbes
int getKeepaliveProbes()
Undocumented in source. Be warned that the author may not have intended to support it.
getKeepaliveWaitTime
Duration getKeepaliveWaitTime()
Undocumented in source. Be warned that the author may not have intended to support it.
getKeyCertOptions
KeyCertOptions getKeyCertOptions()

@return the key/cert options

getOpenSslEngineOptions
OpenSSLEngineOptions getOpenSslEngineOptions()

Set to use SSL engine implementation to use.

getPemKeyCertOptions
PemKeyCertOptions getPemKeyCertOptions()

Get the key/cert store options in pem format.

getRetryInterval
Duration getRetryInterval()
Undocumented in source. Be warned that the author may not have intended to support it.
getRetryTimes
int getRetryTimes()
Undocumented in source. Be warned that the author may not have intended to support it.
getSoLinger
int getSoLinger()

@return is SO_linger enabled

getSslHandshakeTimeout
Duration getSslHandshakeTimeout()

@return the SSL handshake timeout, in time unit specified by {@link #getSslHandshakeTimeoutUnit()}.

isSsl
bool isSsl()

@return is SSL/TLS enabled?

isTcpCork
bool isTcpCork()

@return wether {@code TCP_CORK} option is enabled

isTcpFastOpen
bool isTcpFastOpen()

@return wether {@code TCP_FASTOPEN} option is enabled

isTcpKeepAlive
bool isTcpKeepAlive()

@return is TCP keep alive enabled?

isTcpNoDelay
bool isTcpNoDelay()

@return TCP no delay enabled ?

isTcpQuickAck
bool isTcpQuickAck()

@return wether {@code TCP_QUICKACK} option is enabled

isUseAlpn
bool isUseAlpn()

@return whether to use or not Application-Layer Protocol Negotiation

opEquals
bool opEquals(Object o)
Undocumented in source. Be warned that the author may not have intended to support it.
setIdleTimeout
TcpSslOptions setIdleTimeout(Duration value)

Set the idle timeout, default time unit is seconds. Zero means don't timeout. This determines if a connection will timeout and be closed if no data is received within the timeout.

setKeepaliveInterval
TcpSslOptions setKeepaliveInterval(Duration value)
Undocumented in source. Be warned that the author may not have intended to support it.
setKeepaliveProbes
TcpSslOptions setKeepaliveProbes(int times)
Undocumented in source. Be warned that the author may not have intended to support it.
setKeepaliveWaitTime
TcpSslOptions setKeepaliveWaitTime(Duration value)
Undocumented in source. Be warned that the author may not have intended to support it.
setKeyCertOptions
TcpSslOptions setKeyCertOptions(KeyCertOptions options)

Set the key/cert options.

setLogActivity
TcpSslOptions setLogActivity(bool logEnabled)
Undocumented in source. Be warned that the author may not have intended to support it.
setOpenSslEngineOptions
TcpSslOptions setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
Undocumented in source. Be warned that the author may not have intended to support it.
setPemKeyCertOptions
TcpSslOptions setPemKeyCertOptions(PemKeyCertOptions options)

Set the key/cert store options in pem format. @param options the options in pem format @return a reference to this, so the API can be used fluently

setReceiveBufferSize
TcpSslOptions setReceiveBufferSize(int receiveBufferSize)
Undocumented in source. Be warned that the author may not have intended to support it.
setRetryInterval
TcpSslOptions setRetryInterval(Duration timeout)
Undocumented in source. Be warned that the author may not have intended to support it.
setRetryTimes
TcpSslOptions setRetryTimes(int times)
Undocumented in source. Be warned that the author may not have intended to support it.
setReuseAddress
TcpSslOptions setReuseAddress(bool reuseAddress)
Undocumented in source. Be warned that the author may not have intended to support it.
setReusePort
TcpSslOptions setReusePort(bool reusePort)
Undocumented in source. Be warned that the author may not have intended to support it.
setSendBufferSize
TcpSslOptions setSendBufferSize(int sendBufferSize)
Undocumented in source. Be warned that the author may not have intended to support it.
setSoLinger
TcpSslOptions setSoLinger(int soLinger)

Set whether SO_linger keep alive is enabled

setSsl
TcpSslOptions setSsl(bool ssl)

Set whether SSL/TLS is enabled

setSslHandshakeTimeout
TcpSslOptions setSslHandshakeTimeout(Duration sslHandshakeTimeout)

Set the SSL handshake timeout, default time unit is seconds.

setTcpCork
TcpSslOptions setTcpCork(bool tcpCork)

Enable the {@code TCP_CORK} option - only with linux native transport.

setTcpFastOpen
TcpSslOptions setTcpFastOpen(bool tcpFastOpen)

Enable the {@code TCP_FASTOPEN} option - only with linux native transport.

setTcpKeepAlive
TcpSslOptions setTcpKeepAlive(bool tcpKeepAlive)

Set whether TCP keep alive is enabled

setTcpNoDelay
TcpSslOptions setTcpNoDelay(bool tcpNoDelay)

Set whether TCP no delay is enabled

setTcpQuickAck
TcpSslOptions setTcpQuickAck(bool tcpQuickAck)

Enable the {@code TCP_QUICKACK} option - only with linux native transport.

setTrafficClass
TcpSslOptions setTrafficClass(int trafficClass)
Undocumented in source. Be warned that the author may not have intended to support it.
setUseAlpn
TcpSslOptions setUseAlpn(bool useAlpn)

Set the ALPN usage.

toHash
size_t toHash()
Undocumented in source. Be warned that the author may not have intended to support it.
toStreamOptions
TcpStreamOptions toStreamOptions()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS
enum string[] DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS;

The default ENABLED_SECURE_TRANSPORT_PROTOCOLS value = { "SSLv2Hello", "TLSv1", "TLSv1.1", "TLSv1.2" } <p/> SSLv3 is NOT enabled due to POODLE vulnerability http://en.wikipedia.org/wiki/POODLE <p/> "SSLv2Hello" is NOT enabled since it's disabled by default since JDK7

DEFAULT_IDLE_TIMEOUT
enum Duration DEFAULT_IDLE_TIMEOUT;

Default idle timeout = 0

DEFAULT_KEEPALIVE_INTERVAL
enum Duration DEFAULT_KEEPALIVE_INTERVAL;

the interval between subsequential keepalive probes, regardless of what the connection has exchanged in the meantime

DEFAULT_KEEPALIVE_PROBES
enum int DEFAULT_KEEPALIVE_PROBES;

the number of unacknowledged probes to send before considering the connection dead and notifying the application layer

DEFAULT_KEEPALIVE_WAITTIME
enum Duration DEFAULT_KEEPALIVE_WAITTIME;

the interval between the last data packet sent (simple ACKs are not considered data) and the first keepalive probe; after the connection is marked to need keepalive, this counter is not used any further

DEFAULT_RETRY_INTERVAL
enum Duration DEFAULT_RETRY_INTERVAL;
Undocumented in source.
DEFAULT_RETRY_TIMES
enum int DEFAULT_RETRY_TIMES;
Undocumented in source.
DEFAULT_SO_LINGER
enum int DEFAULT_SO_LINGER;

The default value of SO_linger = -1

DEFAULT_SSL
enum bool DEFAULT_SSL;

SSL enable by default = false

DEFAULT_SSL_HANDSHAKE_TIMEOUT
enum Duration DEFAULT_SSL_HANDSHAKE_TIMEOUT;

The default value of SSL handshake timeout = 10 SECONDS

DEFAULT_TCP_CORK
enum bool DEFAULT_TCP_CORK;

The default TCP_CORK value = false

DEFAULT_TCP_FAST_OPEN
enum bool DEFAULT_TCP_FAST_OPEN;

The default TCP_FASTOPEN value = false

DEFAULT_TCP_KEEP_ALIVE
enum bool DEFAULT_TCP_KEEP_ALIVE;

The default value of TCP keep alive = false

DEFAULT_TCP_NO_DELAY
enum bool DEFAULT_TCP_NO_DELAY;

The default value of TCP-no-delay = true (Nagle disabled)

DEFAULT_TCP_QUICKACK
enum bool DEFAULT_TCP_QUICKACK;

The default TCP_QUICKACK value = false

DEFAULT_USE_ALPN
enum bool DEFAULT_USE_ALPN;

Default use alpn = false

DEFAULT_USE_POOLED_BUFFERS
enum bool DEFAULT_USE_POOLED_BUFFERS;

The default value of Netty use pooled buffers = false

Inherited Members

From NetworkOptions

DEFAULT_SEND_BUFFER_SIZE
enum int DEFAULT_SEND_BUFFER_SIZE;

The default value of TCP send buffer size

DEFAULT_RECEIVE_BUFFER_SIZE
enum int DEFAULT_RECEIVE_BUFFER_SIZE;

The default value of TCP receive buffer size

DEFAULT_DECODER_BUFFER_SIZE
enum int DEFAULT_DECODER_BUFFER_SIZE;

The default value of decoder buffer size

DEFAULT_ENCODER_BUFFER_SIZE
enum int DEFAULT_ENCODER_BUFFER_SIZE;

The default value of encoder buffer size

DEFAULT_TRAFFIC_CLASS
enum int DEFAULT_TRAFFIC_CLASS;

The default value of traffic class

DEFAULT_REUSE_ADDRESS
enum bool DEFAULT_REUSE_ADDRESS;

The default value of reuse address

DEFAULT_REUSE_PORT
enum bool DEFAULT_REUSE_PORT;

The default value of reuse port

DEFAULT_LOG_ENABLED
enum bool DEFAULT_LOG_ENABLED;

The default log enabled = false

getSendBufferSize
int getSendBufferSize()

Return the TCP send buffer size, in bytes.

setSendBufferSize
NetworkOptions setSendBufferSize(int sendBufferSize)

Set the TCP send buffer size

getReceiveBufferSize
int getReceiveBufferSize()

Return the TCP receive buffer size, in bytes

setReceiveBufferSize
NetworkOptions setReceiveBufferSize(int receiveBufferSize)

Set the TCP receive buffer size

getEncoderBufferSize
int getEncoderBufferSize()

Return the encoder buffer size, in bytes

setEncoderBufferSize
NetworkOptions setEncoderBufferSize(int size)

Set the encoder buffer size

getDecoderBufferSize
int getDecoderBufferSize()

Return the decoder buffer size, in bytes

setDecoderBufferSize
NetworkOptions setDecoderBufferSize(int size)

Set the decoder buffer size

getTrafficClass
int getTrafficClass()

@return the value of traffic class

setTrafficClass
NetworkOptions setTrafficClass(int trafficClass)

Set the value of traffic class

getLogActivity
bool getLogActivity()

@return true when network activity logging is enabled

setLogActivity
NetworkOptions setLogActivity(bool logActivity)

Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.

isReuseAddress
bool isReuseAddress()

@return the value of reuse address

setReuseAddress
NetworkOptions setReuseAddress(bool reuseAddress)

Set the value of reuse address @param reuseAddress the value of reuse address @return a reference to this, so the API can be used fluently

isReusePort
bool isReusePort()

@return the value of reuse address - only supported by native transports

setReusePort
NetworkOptions setReusePort(bool reusePort)

Set the value of reuse port. <p/> This is only supported by native transports.

opEquals
bool opEquals(Object o)
Undocumented in source. Be warned that the author may not have intended to support it.
toHash
size_t toHash()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta