AWS IoT Device SDK C++ v2 1.44.1
AWS IoT Device SDK C++ v2
Loading...
Searching...
No Matches
Aws::Iotsecuretunneling::SecureTunnelBuilder Class Referencefinal

#include <SecureTunnel.h>

Public Member Functions

 SecureTunnelBuilder (Crt::Allocator *allocator, Crt::Io::ClientBootstrap &clientBootstrap, const Crt::Io::SocketOptions &socketOptions, const std::string &accessToken, aws_secure_tunneling_local_proxy_mode localProxyMode, const std::string &endpointHost)
 SecureTunnelBuilder (Crt::Allocator *allocator, const Crt::Io::SocketOptions &socketOptions, const std::string &accessToken, aws_secure_tunneling_local_proxy_mode localProxyMode, const std::string &endpointHost)
 SecureTunnelBuilder (Crt::Allocator *allocator, const std::string &accessToken, aws_secure_tunneling_local_proxy_mode localProxyMode, const std::string &endpointHost)
SecureTunnelBuilderWithTlsConnectionOptions (const Crt::Io::TlsConnectionOptions &tslOptions)
SecureTunnelBuilderWithRootCa (const std::string &rootCa)
SecureTunnelBuilderWithClientToken (const std::string &clientToken)
SecureTunnelBuilderWithHttpClientConnectionProxyOptions (const Crt::Http::HttpClientConnectionProxyOptions &httpClientConnectionProxyOptions)
SecureTunnelBuilderWithOnConnectionSuccess (OnConnectionSuccess onConnectionSuccess)
SecureTunnelBuilderWithOnConnectionFailure (OnConnectionFailure onConnectionFailure)
SecureTunnelBuilderWithOnConnectionShutdown (OnConnectionShutdown onConnectionShutdown)
SecureTunnelBuilderWithOnSendMessageComplete (OnSendMessageComplete onSendMessageComplete)
SecureTunnelBuilderWithOnMessageReceived (OnMessageReceived onMessageReceived)
SecureTunnelBuilderWithOnStreamStarted (OnStreamStarted onStreamStarted)
SecureTunnelBuilderWithOnStreamStopped (OnStreamStopped onStreamStopped)
SecureTunnelBuilderWithOnConnectionStarted (OnConnectionStarted onConnectionStarted)
SecureTunnelBuilderWithOnConnectionReset (OnConnectionReset onConnectionReset)
SecureTunnelBuilderWithOnStreamReset (OnStreamReset onStreamReset)
SecureTunnelBuilderWithOnSessionReset (OnSessionReset onSessionReset)
SecureTunnelBuilderWithOnStopped (OnStopped onStopped)
SecureTunnelBuilderWithOnDataReceive (OnDataReceive onDataReceive)
SecureTunnelBuilderWithOnConnectionComplete (OnConnectionComplete onConnectionComplete)
SecureTunnelBuilderWithOnStreamStart (OnStreamStart onStreamStart)
SecureTunnelBuilderWithOnSendDataComplete (OnSendDataComplete onSendDataComplete)
std::shared_ptr< SecureTunnelBuild () noexcept

Friends

class SecureTunnel

Detailed Description

Represents a unique configuration for a secure tunnel

Constructor & Destructor Documentation

◆ SecureTunnelBuilder() [1/3]

Aws::Iotsecuretunneling::SecureTunnelBuilder::SecureTunnelBuilder ( Crt::Allocator * allocator,
Crt::Io::ClientBootstrap & clientBootstrap,
const Crt::Io::SocketOptions & socketOptions,
const std::string & accessToken,
aws_secure_tunneling_local_proxy_mode localProxyMode,
const std::string & endpointHost )

Constructor arguments are the minimum required to create a secure tunnel

◆ SecureTunnelBuilder() [2/3]

Aws::Iotsecuretunneling::SecureTunnelBuilder::SecureTunnelBuilder ( Crt::Allocator * allocator,
const Crt::Io::SocketOptions & socketOptions,
const std::string & accessToken,
aws_secure_tunneling_local_proxy_mode localProxyMode,
const std::string & endpointHost )

Constructor arguments are the minimum required to create a secure tunnel

◆ SecureTunnelBuilder() [3/3]

Aws::Iotsecuretunneling::SecureTunnelBuilder::SecureTunnelBuilder ( Crt::Allocator * allocator,
const std::string & accessToken,
aws_secure_tunneling_local_proxy_mode localProxyMode,
const std::string & endpointHost )

Constructor arguments are the minimum required to create a secure tunnel

Member Function Documentation

◆ Build()

std::shared_ptr< SecureTunnel > Aws::Iotsecuretunneling::SecureTunnelBuilder::Build ( )
noexcept

Will return a shared pointer to a new SecureTunnel that countains a new aws_secure_tunnel that is generated using the set members of SecureTunnelBuilder. On failure, the shared_ptr will contain a nullptr, call Crt::LastErrorOrUnknown(); to get the reason for failure.

◆ WithClientToken()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithClientToken ( const std::string & clientToken)

Sets Client Token to a specified value rather than allowing the secure tunnel to auto-generate one.

Parameters
clientTokenstring to use as unique client token for secure tunnel connection
Returns
this builder object

◆ WithHttpClientConnectionProxyOptions()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithHttpClientConnectionProxyOptions ( const Crt::Http::HttpClientConnectionProxyOptions & httpClientConnectionProxyOptions)

Sets http proxy options.

Parameters
httpClientConnectionProxyOptionshttp proxy configuration for connection establishment
Returns
this builder object

◆ WithOnConnectionComplete()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithOnConnectionComplete ( OnConnectionComplete onConnectionComplete)

◆ WithOnConnectionFailure()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithOnConnectionFailure ( OnConnectionFailure onConnectionFailure)

Setup callback handler trigged when an Secure Tunnel fails a connection attempt.

Parameters
onConnectionFailure
Returns
this builder object

◆ WithOnConnectionReset()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithOnConnectionReset ( OnConnectionReset onConnectionReset)

Setup callback handler trigged when an Secure Tunnel resets a connection.

Parameters
onConnectionReset
Returns
this builder object

◆ WithOnConnectionShutdown()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithOnConnectionShutdown ( OnConnectionShutdown onConnectionShutdown)

Setup callback handler trigged when an Secure Tunnel shuts down connection to the secure tunnel service.

Parameters
onConnectionShutdown
Returns
this builder object

◆ WithOnConnectionStarted()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithOnConnectionStarted ( OnConnectionStarted onConnectionStarted)

Setup callback handler trigged when an Secure Tunnel starts a connection with a source through the secure tunnel service.

Parameters
onConnectionStarted
Returns
this builder object

◆ WithOnConnectionSuccess()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithOnConnectionSuccess ( OnConnectionSuccess onConnectionSuccess)

Setup callback handler trigged when an Secure Tunnel establishes a connection and receives available service ids.

Parameters
onConnectionSuccess
Returns
this builder object

◆ WithOnDataReceive()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithOnDataReceive ( OnDataReceive onDataReceive)

Deprecated - Use WithOnMessageReceived()

◆ WithOnMessageReceived()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithOnMessageReceived ( OnMessageReceived onMessageReceived)

Setup callback handler trigged when an Secure Tunnel receives a Message through the secure tunnel service.

Parameters
onMessageReceived
Returns
this builder object

◆ WithOnSendDataComplete()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithOnSendDataComplete ( OnSendDataComplete onSendDataComplete)

Deprecated - Use WithOnSendMessageComplete

◆ WithOnSendMessageComplete()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithOnSendMessageComplete ( OnSendMessageComplete onSendMessageComplete)

Setup callback handler trigged when an Secure Tunnel completes sending a message to the secure tunnel service.

Parameters
onSendMessageComplete
Returns
this builder object

◆ WithOnSessionReset()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithOnSessionReset ( OnSessionReset onSessionReset)

Setup callback handler trigged when an Secure Tunnel receives a session reset from the secure tunnel service.

Parameters
onSessionReset
Returns
this builder object

◆ WithOnStopped()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithOnStopped ( OnStopped onStopped)

Setup callback handler trigged when an Secure Tunnel completes entering a stopped state

Parameters
onStopped
Returns
this builder object

◆ WithOnStreamReset()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithOnStreamReset ( OnStreamReset onStreamReset)

Setup callback handler trigged when an Secure Tunnel receives a stream reset.

Parameters
onStreamReset
Returns
this builder object

◆ WithOnStreamStart()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithOnStreamStart ( OnStreamStart onStreamStart)

Deprecated - Use WithOnStreamStarted

◆ WithOnStreamStarted()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithOnStreamStarted ( OnStreamStarted onStreamStarted)

Setup callback handler trigged when an Secure Tunnel starts a stream with a source through the secure tunnel service.

Parameters
onStreamStarted
Returns
this builder object

◆ WithOnStreamStopped()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithOnStreamStopped ( OnStreamStopped onStreamStopped)

Setup callback handler trigged when an Secure Tunnel stops a stream.

Parameters
onStreamStopped
Returns
this builder object

◆ WithRootCa()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithRootCa ( const std::string & rootCa)

Sets rootCA to be used for this secure tunnel connection overriding the default trust store.

Parameters
rootCastring to use as rootCA for secure tunnel connection
Returns
this builder object

◆ WithTlsConnectionOptions()

SecureTunnelBuilder & Aws::Iotsecuretunneling::SecureTunnelBuilder::WithTlsConnectionOptions ( const Crt::Io::TlsConnectionOptions & tslOptions)

Sets TLS options to be used by secure tunnel connection.

Parameters
tslOptionsTLS options to use for secure tunnel connection. If provided, the rootCA settings in these options will override any rootCA provided to the builder.
Returns
this builder object

◆ SecureTunnel

friend class SecureTunnel
friend

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