Class TcpConfig
java.lang.Object
io.vertx.core.net.TransportConfig
io.vertx.core.net.TcpConfig
- Author:
- Julien Viet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TcpConfigcopy()<T> TReturns a configurable TCP option.intReturn the TCP receive buffer size, in bytesintReturn the TCP send buffer size, in bytes.intintbooleanbooleanboolean<T> TcpConfigConfigure a TCP option.setReceiveBufferSize(int receiveBufferSize) Set the TCP receive buffer sizesetReuseAddress(boolean reuseAddress) Set the value of reuse addresssetSendBufferSize(int sendBufferSize) Set the TCP send buffer sizesetSoKeepAlive(boolean keepAlive) Set whether keep alive is enabledsetSoLinger(int soLinger) Set whether SO_linger keep alive is enabledsetSoReusePort(boolean soReusePort) Set the value of reuse port.setTrafficClass(int trafficClass) Set the value of traffic class
-
Constructor Details
-
TcpConfig
public TcpConfig() -
TcpConfig
-
-
Method Details
-
copy
- Specified by:
copyin classTransportConfig
-
getSendBufferSize
public int getSendBufferSize()Return the TCP send buffer size, in bytes.- Returns:
- the send buffer size
-
setSendBufferSize
Set the TCP send buffer size- Parameters:
sendBufferSize- the buffers size, in bytes- Returns:
- a reference to this, so the API can be used fluently
-
getReceiveBufferSize
public int getReceiveBufferSize()Return the TCP receive buffer size, in bytes- Returns:
- the receive buffer size
-
setReceiveBufferSize
Set the TCP receive buffer size- Parameters:
receiveBufferSize- the buffers size, in bytes- Returns:
- a reference to this, so the API can be used fluently
-
isReuseAddress
public boolean isReuseAddress()- Returns:
- the value of reuse address
-
setReuseAddress
Set the value of reuse address- Parameters:
reuseAddress- the value of reuse address- Returns:
- a reference to this, so the API can be used fluently
-
getTrafficClass
public int getTrafficClass()- Returns:
- the value of traffic class
-
setTrafficClass
Set the value of traffic class- Parameters:
trafficClass- the value of traffic class- Returns:
- a reference to this, so the API can be used fluently
-
isSoReusePort
public boolean isSoReusePort()- Returns:
- the value of reuse address - only supported by native transports
-
setSoReusePort
Set the value of reuse port. This is only supported by native transports.- Parameters:
soReusePort- the value of reuse port- Returns:
- a reference to this, so the API can be used fluently
-
isSoKeepAlive
public boolean isSoKeepAlive()- Returns:
- is keep alive enabled?
-
setSoKeepAlive
Set whether keep alive is enabled- Parameters:
keepAlive- true if keep alive is enabled- Returns:
- a reference to this, so the API can be used fluently
-
getSoLinger
public int getSoLinger()- Returns:
- is SO_linger enabled
-
setSoLinger
Set whether SO_linger keep alive is enabled- Parameters:
soLinger- true if SO_linger is enabled- Returns:
- a reference to this, so the API can be used fluently
-
getOption
Returns a configurable TCP option.- Parameters:
option- the option to probe- Returns:
- the option value or
nullwhen not set
-
setOption
-