Allows configuring the TCP properties
- Since:
- 0.12.0
-
Method Summary
Modifier and TypeMethodDescriptionclientTimeout(Integer clientTimeout) Defines the SO_TIMEOUT value for client sockets.connectionTimeout(Integer connectionTimeout) Defines how long to wait for the outbound connection to be created.Defines the SO_KEEPALIVE behavior for open sockets.Defines the SO_LINGER value, related to how long the socket will take to close.receiveBufferSize(Integer receiveBufferSize) Defines the size of the buffer to use when receiving data.sendBufferSize(Integer sendBufferSize) Defines the size of the buffer to use when sending data.sendTcpNoDelay(Boolean sendTcpNoDelay) Defines whether data should be collected or not before sending.
-
Method Details
-
sendBufferSize
Defines the size of the buffer to use when sending data.- Parameters:
sendBufferSize- size of the buffer (in bytes).- Returns:
- this configurer
-
receiveBufferSize
Defines the size of the buffer to use when receiving data.- Parameters:
receiveBufferSize- size of the buffer (in bytes).- Returns:
- this configurer
-
clientTimeout
Defines the SO_TIMEOUT value for client sockets.- Parameters:
clientTimeout- the timeout (in milliseconds).- Returns:
- this configurer
-
sendTcpNoDelay
Defines whether data should be collected or not before sending.- Parameters:
sendTcpNoDelay- whether to send everything or collect data- Returns:
- this configurer
-
linger
Defines the SO_LINGER value, related to how long the socket will take to close.- Parameters:
linger- timeout (in milliseconds)- Returns:
- this configurer
-
keepAlive
Defines the SO_KEEPALIVE behavior for open sockets.- Parameters:
keepAlive- the value- Returns:
- this configurer
-
connectionTimeout
Defines how long to wait for the outbound connection to be created.- Parameters:
connectionTimeout- timeout (in milliseconds)- Returns:
- this configurer
-