aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Aws::Crt::Io::SocketOptions Class Reference

#include <SocketOptions.h>

Public Member Functions

 SocketOptions ()
 
 SocketOptions (const SocketOptions &rhs)=default
 
 SocketOptions (SocketOptions &&rhs)=default
 
SocketOptionsoperator= (const SocketOptions &rhs)=default
 
SocketOptionsoperator= (SocketOptions &&rhs)=default
 
void SetSocketType (SocketType type)
 
SocketType GetSocketType () const
 
void SetSocketDomain (SocketDomain domain)
 
SocketDomain GetSocketDomain () const
 
void SetConnectTimeoutMs (uint32_t timeout)
 
uint32_t GetConnectTimeoutMs () const
 
void SetKeepAliveIntervalSec (uint16_t keepAliveInterval)
 
uint16_t GetKeepAliveIntervalSec () const
 
void SetKeepAliveTimeoutSec (uint16_t keepAliveTimeout)
 
uint16_t GetKeepAliveTimeoutSec () const
 
void SetKeepAliveMaxFailedProbes (uint16_t maxProbes)
 
uint16_t GetKeepAliveMaxFailedProbes () const
 
void SetKeepAlive (bool keepAlive)
 
bool GetKeepAlive () const
 
void SetTcpNodelay (SocketTcpNodelay tcpNodelay)
 
SocketTcpNodelay GetTcpNodelay () const
 

Detailed Description

Socket configuration options

Constructor & Destructor Documentation

◆ SocketOptions() [1/3]

Aws::Crt::Io::SocketOptions::SocketOptions ( )

◆ SocketOptions() [2/3]

Aws::Crt::Io::SocketOptions::SocketOptions ( const SocketOptions rhs)
default

◆ SocketOptions() [3/3]

Aws::Crt::Io::SocketOptions::SocketOptions ( SocketOptions &&  rhs)
default

Member Function Documentation

◆ GetConnectTimeoutMs()

uint32_t Aws::Crt::Io::SocketOptions::GetConnectTimeoutMs ( ) const
inline
Returns
the connection timeout in milliseconds to use with the socket

◆ GetKeepAlive()

bool Aws::Crt::Io::SocketOptions::GetKeepAlive ( ) const
inline
Returns
true/false if the socket implementation should use TCP keepalive

◆ GetKeepAliveIntervalSec()

uint16_t Aws::Crt::Io::SocketOptions::GetKeepAliveIntervalSec ( ) const
inline
Returns
the (tcp) keep alive interval to use with the socket, in seconds

◆ GetKeepAliveMaxFailedProbes()

uint16_t Aws::Crt::Io::SocketOptions::GetKeepAliveMaxFailedProbes ( ) const
inline
Returns
number of keepalive probes allowed to fail before a connection is considered lost.

◆ GetKeepAliveTimeoutSec()

uint16_t Aws::Crt::Io::SocketOptions::GetKeepAliveTimeoutSec ( ) const
inline
Returns
interval, in seconds, that a connection must be idle for before keep alive probes begin to get sent out

◆ GetSocketDomain()

SocketDomain Aws::Crt::Io::SocketOptions::GetSocketDomain ( ) const
inline
Returns
the domain type to use with the socket

◆ GetSocketType()

SocketType Aws::Crt::Io::SocketOptions::GetSocketType ( ) const
inline
Returns
the type of socket to use

◆ GetTcpNodelay()

SocketTcpNodelay Aws::Crt::Io::SocketOptions::GetTcpNodelay ( ) const
inline
Returns
how the TCP_NODELAY option (Nagle's algorithm) should be configured on the socket

◆ operator=() [1/2]

SocketOptions & Aws::Crt::Io::SocketOptions::operator= ( const SocketOptions rhs)
default

◆ operator=() [2/2]

SocketOptions & Aws::Crt::Io::SocketOptions::operator= ( SocketOptions &&  rhs)
default

◆ SetConnectTimeoutMs()

void Aws::Crt::Io::SocketOptions::SetConnectTimeoutMs ( uint32_t  timeout)
inline

Set connection timeout

Parameters
timeoutconnection timeout in milliseconds.

◆ SetKeepAlive()

void Aws::Crt::Io::SocketOptions::SetKeepAlive ( bool  keepAlive)
inline

Set keep alive option.

Parameters
keepAliveTrue, periodically transmit keepalive messages for detecting a disconnected peer.

◆ SetKeepAliveIntervalSec()

void Aws::Crt::Io::SocketOptions::SetKeepAliveIntervalSec ( uint16_t  keepAliveInterval)
inline

Set keep alive interval seconds.

Parameters
keepAliveIntervalDuration, in seconds, between keepalive probes. If 0, then a default value is used.

◆ SetKeepAliveMaxFailedProbes()

void Aws::Crt::Io::SocketOptions::SetKeepAliveMaxFailedProbes ( uint16_t  maxProbes)
inline

Set keep alive max failed probes.

Parameters
maxProbesThe number of keepalive probes allowed to fail before a connection is considered lost.

◆ SetKeepAliveTimeoutSec()

void Aws::Crt::Io::SocketOptions::SetKeepAliveTimeoutSec ( uint16_t  keepAliveTimeout)
inline

Set keep alive time out seconds.

Parameters
keepAliveTimeoutinterval, in seconds, that a connection must be idle for before keep alive probes begin to get sent out

◆ SetSocketDomain()

void Aws::Crt::Io::SocketOptions::SetSocketDomain ( SocketDomain  domain)
inline

Set socket domain

Parameters
domainSocketDomain object.

◆ SetSocketType()

void Aws::Crt::Io::SocketOptions::SetSocketType ( SocketType  type)
inline

Set socket type

Parameters
typeSocketType object.

◆ SetTcpNodelay()

void Aws::Crt::Io::SocketOptions::SetTcpNodelay ( SocketTcpNodelay  tcpNodelay)
inline

Set the TCP_NODELAY option (Nagle's algorithm). TCP only, ignored for Dgram sockets and the Local socket domain. Defaults to On.

Parameters
tcpNodelayDefault leaves the OS default in place, On disables Nagle's algorithm so small writes are sent immediately, Off explicitly (re)enables it.

The documentation for this class was generated from the following files: