![]() |
Hazelcast C++ Client
Hazelcast C++ Client Library
|
TCP Socket options. More...
#include <socket_options.h>
Public Member Functions | |
bool | is_tcp_no_delay () const |
TCP_NODELAY socket option. More... | |
socket_options & | set_tcp_no_delay (bool tcp_no_delay) |
Enable/disable TCP_NODELAY socket option. More... | |
bool | is_keep_alive () const |
SO_KEEPALIVE socket option. More... | |
socket_options & | set_keep_alive (bool keep_alive) |
Enable/disable SO_KEEPALIVE socket option. More... | |
bool | is_reuse_address () const |
SO_REUSEADDR socket option. More... | |
socket_options & | set_reuse_address (bool reuse_address) |
Enable/disable the SO_REUSEADDR socket option. More... | |
int | get_linger_seconds () const |
Gets SO_LINGER with the specified linger time in seconds. More... | |
socket_options & | set_linger_seconds (int linger_seconds) |
Enable/disable SO_LINGER with the specified linger time in seconds. More... | |
int | get_buffer_size_in_bytes () const |
If set to 0 or less, then it is not set on the socket. More... | |
socket_options & | set_buffer_size_in_bytes (int buffer_size) |
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.
Definition at line 31 of file socket_options.h.
int hazelcast::client::config::socket_options::get_buffer_size_in_bytes | ( | ) | 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
Definition at line 420 of file config.cpp.
int hazelcast::client::config::socket_options::get_linger_seconds | ( | ) | const |
Gets SO_LINGER with the specified linger time in seconds.
Definition at line 411 of file config.cpp.
bool hazelcast::client::config::socket_options::is_keep_alive | ( | ) | const |
bool hazelcast::client::config::socket_options::is_reuse_address | ( | ) | const |
bool hazelcast::client::config::socket_options::is_tcp_no_delay | ( | ) | const |
socket_options & hazelcast::client::config::socket_options::set_buffer_size_in_bytes | ( | int | buffer_size | ) |
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 |
Definition at line 424 of file config.cpp.
socket_options & hazelcast::client::config::socket_options::set_keep_alive | ( | bool | keep_alive | ) |
Enable/disable SO_KEEPALIVE socket option.
keepAlive | enabled if true |
Definition at line 397 of file config.cpp.
socket_options & hazelcast::client::config::socket_options::set_linger_seconds | ( | int | linger_seconds | ) |
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 |
Definition at line 415 of file config.cpp.
socket_options & hazelcast::client::config::socket_options::set_reuse_address | ( | bool | reuse_address | ) |
Enable/disable the SO_REUSEADDR socket option.
reuseAddress | enabled if true |
Definition at line 406 of file config.cpp.
socket_options & hazelcast::client::config::socket_options::set_tcp_no_delay | ( | bool | tcp_no_delay | ) |
Enable/disable TCP_NODELAY socket option.
tcpNoDelay |
Definition at line 388 of file config.cpp.