NetServerOptions

Options for configuring a {@link hunt.net.NetServer}.

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

class NetServerOptions : TcpSslOptions {}

Constructors

this
this()

Default constructor

this
this(NetServerOptions other)

Copy constructor

Members

Functions

getAcceptBacklog
int getAcceptBacklog()

@return the value of accept backlog

getClientAuth
ClientAuth getClientAuth()
Undocumented in source. Be warned that the author may not have intended to support it.
getHost
string getHost()

@return the host

getPort
ushort getPort()

@return the port

ioThreadSize
size_t ioThreadSize()
Undocumented in source. Be warned that the author may not have intended to support it.
ioThreadSize
NetServerOptions ioThreadSize(size_t value)
Undocumented in source. Be warned that the author may not have intended to support it.
isSni
bool isSni()

@return whether the server supports Server Name Indication

opEquals
bool opEquals(Object o)
Undocumented in source. Be warned that the author may not have intended to support it.
setAcceptBacklog
NetServerOptions setAcceptBacklog(int acceptBacklog)

Set the accept back log

setClientAuth
NetServerOptions setClientAuth(ClientAuth clientAuth)

Set whether client auth is required

setHost
NetServerOptions setHost(string host)

Set the host @param host the host @return a reference to this, so the API can be used fluently

setIdleTimeout
NetServerOptions setIdleTimeout(Duration idleTimeout)
Undocumented in source. Be warned that the author may not have intended to support it.
setLogActivity
NetServerOptions setLogActivity(bool logEnabled)
Undocumented in source. Be warned that the author may not have intended to support it.
setOpenSslEngineOptions
NetServerOptions setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
Undocumented in source. Be warned that the author may not have intended to support it.
setPort
NetServerOptions setPort(ushort port)

Set the port

setReceiveBufferSize
NetServerOptions setReceiveBufferSize(int receiveBufferSize)
Undocumented in source. Be warned that the author may not have intended to support it.
setReuseAddress
NetServerOptions setReuseAddress(bool reuseAddress)
Undocumented in source. Be warned that the author may not have intended to support it.
setReusePort
NetServerOptions setReusePort(bool reusePort)
Undocumented in source. Be warned that the author may not have intended to support it.
setSendBufferSize
NetServerOptions setSendBufferSize(int sendBufferSize)
Undocumented in source. Be warned that the author may not have intended to support it.
setSni
NetServerOptions setSni(bool sni)

Set whether the server supports Server Name Indiciation

setSoLinger
NetServerOptions setSoLinger(int soLinger)
Undocumented in source. Be warned that the author may not have intended to support it.
setSsl
NetServerOptions setSsl(bool ssl)
Undocumented in source. Be warned that the author may not have intended to support it.
setSslHandshakeTimeout
NetServerOptions setSslHandshakeTimeout(Duration sslHandshakeTimeout)
Undocumented in source. Be warned that the author may not have intended to support it.
setTcpCork
NetServerOptions setTcpCork(bool tcpCork)
Undocumented in source. Be warned that the author may not have intended to support it.
setTcpFastOpen
NetServerOptions setTcpFastOpen(bool tcpFastOpen)
Undocumented in source. Be warned that the author may not have intended to support it.
setTcpKeepAlive
NetServerOptions setTcpKeepAlive(bool tcpKeepAlive)
Undocumented in source. Be warned that the author may not have intended to support it.
setTcpNoDelay
NetServerOptions setTcpNoDelay(bool tcpNoDelay)
Undocumented in source. Be warned that the author may not have intended to support it.
setTcpQuickAck
NetServerOptions setTcpQuickAck(bool tcpQuickAck)
Undocumented in source. Be warned that the author may not have intended to support it.
setTrafficClass
NetServerOptions setTrafficClass(int trafficClass)
Undocumented in source. Be warned that the author may not have intended to support it.
setUseAlpn
NetServerOptions setUseAlpn(bool useAlpn)
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.
workerThreadSize
size_t workerThreadSize()
Undocumented in source. Be warned that the author may not have intended to support it.
workerThreadSize
NetServerOptions workerThreadSize(size_t value)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

DEFAULT_ACCEPT_BACKLOG
enum int DEFAULT_ACCEPT_BACKLOG;

The default accept backlog = 1024

DEFAULT_CLIENT_AUTH
enum ClientAuth DEFAULT_CLIENT_AUTH;

Default value of whether client auth is required (SSL/TLS) = No

DEFAULT_HOST
enum string DEFAULT_HOST;

The default host to listen on = "0.0.0.0" (meaning listen on all available interfaces).

DEFAULT_PORT
enum int DEFAULT_PORT;

The default port to listen on = 0 (meaning a random ephemeral free port will be chosen)

DEFAULT_SNI
enum bool DEFAULT_SNI;

Default value of whether the server supports SNI = false

Inherited Members

From TcpSslOptions

DEFAULT_TCP_NO_DELAY
enum bool DEFAULT_TCP_NO_DELAY;

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

DEFAULT_TCP_KEEP_ALIVE
enum bool DEFAULT_TCP_KEEP_ALIVE;

The default value of TCP keep alive = false

DEFAULT_SO_LINGER
enum int DEFAULT_SO_LINGER;

The default value of SO_linger = -1

DEFAULT_USE_POOLED_BUFFERS
enum bool DEFAULT_USE_POOLED_BUFFERS;

The default value of Netty use pooled buffers = false

DEFAULT_SSL
enum bool DEFAULT_SSL;

SSL enable by default = false

DEFAULT_IDLE_TIMEOUT
enum Duration DEFAULT_IDLE_TIMEOUT;

Default idle timeout = 0

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_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_USE_ALPN
enum bool DEFAULT_USE_ALPN;

Default use alpn = false

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_TCP_FAST_OPEN
enum bool DEFAULT_TCP_FAST_OPEN;

The default TCP_FASTOPEN value = false

DEFAULT_TCP_CORK
enum bool DEFAULT_TCP_CORK;

The default TCP_CORK value = false

DEFAULT_TCP_QUICKACK
enum bool DEFAULT_TCP_QUICKACK;

The default TCP_QUICKACK value = false

DEFAULT_SSL_HANDSHAKE_TIMEOUT
enum Duration DEFAULT_SSL_HANDSHAKE_TIMEOUT;

The default value of SSL handshake timeout = 10 SECONDS

DEFAULT_RETRY_TIMES
enum int DEFAULT_RETRY_TIMES;
Undocumented in source.
DEFAULT_RETRY_INTERVAL
enum Duration DEFAULT_RETRY_INTERVAL;
Undocumented in source.
isTcpNoDelay
bool isTcpNoDelay()

@return TCP no delay enabled ?

setTcpNoDelay
TcpSslOptions setTcpNoDelay(bool tcpNoDelay)

Set whether TCP no delay is enabled

isTcpKeepAlive
bool isTcpKeepAlive()

@return is TCP keep alive enabled?

setTcpKeepAlive
TcpSslOptions setTcpKeepAlive(bool tcpKeepAlive)

Set whether TCP keep alive is enabled

getSoLinger
int getSoLinger()

@return is SO_linger enabled

setSoLinger
TcpSslOptions setSoLinger(int soLinger)

Set whether SO_linger keep alive is enabled

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.

getIdleTimeout
Duration getIdleTimeout()

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

setKeepaliveWaitTime
TcpSslOptions setKeepaliveWaitTime(Duration value)
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.
setKeepaliveInterval
TcpSslOptions setKeepaliveInterval(Duration value)
Undocumented in source. Be warned that the author may not have intended to support it.
getKeepaliveInterval
Duration getKeepaliveInterval()
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.
getKeepaliveProbes
int getKeepaliveProbes()
Undocumented in source. Be warned that the author may not have intended to support it.
isSsl
bool isSsl()

@return is SSL/TLS enabled?

setSsl
TcpSslOptions setSsl(bool ssl)

Set whether SSL/TLS is enabled

getKeyCertOptions
KeyCertOptions getKeyCertOptions()

@return the key/cert options

setKeyCertOptions
TcpSslOptions setKeyCertOptions(KeyCertOptions options)

Set the key/cert options.

getPemKeyCertOptions
PemKeyCertOptions getPemKeyCertOptions()

Get the key/cert store options in pem format.

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

isUseAlpn
bool isUseAlpn()

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

setUseAlpn
TcpSslOptions setUseAlpn(bool useAlpn)

Set the ALPN usage.

getOpenSslEngineOptions
OpenSSLEngineOptions getOpenSslEngineOptions()

Set to use SSL engine implementation to use.

setOpenSslEngineOptions
TcpSslOptions setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
Undocumented in source. Be warned that the author may not have intended to support it.
isTcpFastOpen
bool isTcpFastOpen()

@return wether {@code TCP_FASTOPEN} option is enabled

setTcpFastOpen
TcpSslOptions setTcpFastOpen(bool tcpFastOpen)

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

isTcpCork
bool isTcpCork()

@return wether {@code TCP_CORK} option is enabled

setTcpCork
TcpSslOptions setTcpCork(bool tcpCork)

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

isTcpQuickAck
bool isTcpQuickAck()

@return wether {@code TCP_QUICKACK} option is enabled

setTcpQuickAck
TcpSslOptions setTcpQuickAck(bool tcpQuickAck)

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

getSslHandshakeTimeout
Duration getSslHandshakeTimeout()

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

setSslHandshakeTimeout
TcpSslOptions setSslHandshakeTimeout(Duration sslHandshakeTimeout)

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

setLogActivity
TcpSslOptions setLogActivity(bool logEnabled)
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.
setReceiveBufferSize
TcpSslOptions setReceiveBufferSize(int receiveBufferSize)
Undocumented in source. Be warned that the author may not have intended to support it.
setTrafficClass
TcpSslOptions setTrafficClass(int trafficClass)
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.
setRetryTimes
TcpSslOptions setRetryTimes(int times)
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.
setRetryInterval
TcpSslOptions setRetryInterval(Duration timeout)
Undocumented in source. Be warned that the author may not have intended to support it.
getRetryInterval
Duration getRetryInterval()
Undocumented in source. Be warned that the author may not have intended to support it.
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.
toStreamOptions
TcpStreamOptions toStreamOptions()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta