AWS IoT Device SDK C++ v2: Aws::Crt::Io::SocketOptions Class Reference

AWS IoT Device SDK C++ v2 1.14.0 AWS IoT Device SDK C++ v2

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

## 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

## ◆ 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

  timeout | connection timeout in milliseconds.

## ◆ SetKeepAlive()

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

Set keep alive option.

Parameters

  keepAlive | True, 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

  keepAliveInterval | Duration, 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

  maxProbes | The 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

  keepAliveTimeout | interval, 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

  domain | SocketDomain object.

## ◆ SetSocketType()

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

Set socket type

Parameters

  type | SocketType object.

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

- crt/aws-crt-cpp/include/aws/crt/io/SocketOptions.h
- crt/aws-crt-cpp/source/io/SocketOptions.cpp