Hazelcast C++ Client
|
#include <SocketOptions.h>
Public Member Functions | |
bool | isTcpNoDelay () const |
TCP_NODELAY socket option. More... | |
SocketOptions & | setTcpNoDelay (bool tcpNoDelay) |
Enable/disable TCP_NODELAY socket option. More... | |
bool | isKeepAlive () const |
SO_KEEPALIVE socket option. More... | |
SocketOptions & | setKeepAlive (bool keepAlive) |
Enable/disable SO_KEEPALIVE socket option. More... | |
bool | isReuseAddress () const |
SO_REUSEADDR socket option. More... | |
SocketOptions & | setReuseAddress (bool reuseAddress) |
Enable/disable the SO_REUSEADDR socket option. More... | |
int | getLingerSeconds () const |
Gets SO_LINGER with the specified linger time in seconds. More... | |
SocketOptions & | setLingerSeconds (int lingerSeconds) |
Enable/disable SO_LINGER with the specified linger time in seconds. More... | |
int | getBufferSizeInBytes () const |
If set to 0 or less, then it is not set on the socket. More... | |
SocketOptions & | setBufferSizeInBytes (int bufferSize) |
If set to 0 or less, then it is not set on the socket. More... | |
Static Public Attributes | |
static const int | KILO_BYTE = 1024 |
constant for kilobyte | |
static const int | DEFAULT_BUFFER_SIZE_BYTE = 128 * KILO_BYTE |
default buffer size of Bytes | |
TCP Socket options.
int hazelcast::client::config::SocketOptions::getBufferSizeInBytes | ( | ) | const |
If set to 0 or less, then it is not set on the socket.
The default value is DEFAULT_BUFFER_SIZE_BYTE
Gets the SO_SNDBUF and SO_RCVBUF options value in bytes
int hazelcast::client::config::SocketOptions::getLingerSeconds | ( | ) | const |
Gets SO_LINGER with the specified linger time in seconds.
bool hazelcast::client::config::SocketOptions::isKeepAlive | ( | ) | const |
SO_KEEPALIVE socket option.
bool hazelcast::client::config::SocketOptions::isReuseAddress | ( | ) | const |
SO_REUSEADDR socket option.
bool hazelcast::client::config::SocketOptions::isTcpNoDelay | ( | ) | const |
TCP_NODELAY socket option.
SocketOptions & hazelcast::client::config::SocketOptions::setBufferSizeInBytes | ( | int | bufferSize | ) |
If set to 0 or less, then it is not set on the socket.
The default value is DEFAULT_BUFFER_SIZE_BYTE
Sets the SO_SNDBUF and SO_RCVBUF options to the specified value in bytes
bufferSize | Number of bytes |
SocketOptions & hazelcast::client::config::SocketOptions::setKeepAlive | ( | bool | keepAlive | ) |
Enable/disable SO_KEEPALIVE socket option.
keepAlive | enabled if true |
SocketOptions & hazelcast::client::config::SocketOptions::setLingerSeconds | ( | int | lingerSeconds | ) |
Enable/disable SO_LINGER with the specified linger time in seconds.
if set to a value of 0 or less then it is disabled.
Default value is 3.
lingerSeconds | value in seconds |
SocketOptions & hazelcast::client::config::SocketOptions::setReuseAddress | ( | bool | reuseAddress | ) |
Enable/disable the SO_REUSEADDR socket option.
reuseAddress | enabled if true |
SocketOptions & hazelcast::client::config::SocketOptions::setTcpNoDelay | ( | bool | tcpNoDelay | ) |
Enable/disable TCP_NODELAY socket option.
tcpNoDelay |