aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
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
 
SocketOptions & operator= (const SocketOptions &rhs)=default
 
SocketOptions & operator= (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

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

Member Function Documentation

uint32_t Aws::Crt::Io::SocketOptions::GetConnectTimeoutMs ( ) const
inline
Returns
the connection timeout in milliseconds to use with the socket
bool Aws::Crt::Io::SocketOptions::GetKeepAlive ( ) const
inline
Returns
true/false if the socket implementation should use TCP keepalive
uint16_t Aws::Crt::Io::SocketOptions::GetKeepAliveIntervalSec ( ) const
inline
Returns
the (tcp) keep alive interval to use with the socket, in seconds
uint16_t Aws::Crt::Io::SocketOptions::GetKeepAliveMaxFailedProbes ( ) const
inline
Returns
number of keepalive probes allowed to fail before a connection is considered lost.
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
SocketDomain Aws::Crt::Io::SocketOptions::GetSocketDomain ( ) const
inline
Returns
the domain type to use with the socket
SocketType Aws::Crt::Io::SocketOptions::GetSocketType ( ) const
inline
Returns
the type of socket to use
SocketTcpNodelay Aws::Crt::Io::SocketOptions::GetTcpNodelay ( ) const
inline
Returns
how the TCP_NODELAY option (Nagle's algorithm) should be configured on the socket
SocketOptions& Aws::Crt::Io::SocketOptions::operator= ( const SocketOptions &  rhs)
default
SocketOptions& Aws::Crt::Io::SocketOptions::operator= ( SocketOptions &&  rhs)
default
void Aws::Crt::Io::SocketOptions::SetConnectTimeoutMs ( uint32_t  timeout)
inline

Set connection timeout

Parameters
timeoutconnection timeout in milliseconds.
void Aws::Crt::Io::SocketOptions::SetKeepAlive ( bool  keepAlive)
inline

Set keep alive option.

Parameters
keepAliveTrue, periodically transmit keepalive messages for detecting a disconnected peer.
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.
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.
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
void Aws::Crt::Io::SocketOptions::SetSocketDomain ( SocketDomain  domain)
inline

Set socket domain

Parameters
domainSocketDomain object.
void Aws::Crt::Io::SocketOptions::SetSocketType ( SocketType  type)
inline

Set socket type

Parameters
typeSocketType object.
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: