AWS IoT Device SDK C++ v2  1.34.0
AWS IoT Device SDK C++ v2
Public Member Functions | Protected Member Functions | Friends | List of all members
Aws::Crt::Io::TlsChannelHandler Class Referenceabstract

#include <TlsOptions.h>

Inheritance diagram for Aws::Crt::Io::TlsChannelHandler:
Aws::Crt::Io::ChannelHandler Aws::Crt::Io::ClientTlsChannelHandler

Public Member Functions

virtual ~TlsChannelHandler ()
 
virtual String GetProtocol () const =0
 
- Public Member Functions inherited from Aws::Crt::Io::ChannelHandler
virtual ~ChannelHandler ()=default
 
 ChannelHandler (const ChannelHandler &)=delete
 
ChannelHandleroperator= (const ChannelHandler &)=delete
 
bool ChannelsThreadIsCallersThread () const
 
void ShutDownChannel (int errorCode)
 
void ScheduleTask (std::function< void(TaskStatus)> &&task)
 
void ScheduleTask (std::function< void(TaskStatus)> &&task, std::chrono::nanoseconds run_in)
 

Protected Member Functions

 TlsChannelHandler (struct aws_channel_slot *slot, const struct aws_tls_connection_options &options, Allocator *allocator=ApiAllocator())
 
void CompleteTlsNegotiation (int errorCode)
 
- Protected Member Functions inherited from Aws::Crt::Io::ChannelHandler
virtual int ProcessReadMessage (struct aws_io_message *message)=0
 
virtual int ProcessWriteMessage (struct aws_io_message *message)=0
 
virtual int IncrementReadWindow (size_t size)=0
 
virtual void ProcessShutdown (ChannelDirection dir, int errorCode, bool freeScarceResourcesImmediately)=0
 
virtual size_t InitialWindowSize ()=0
 
virtual size_t MessageOverhead ()=0
 
virtual void ResetStatistics ()
 
virtual void GatherStatistics (struct aws_array_list *)
 
 ChannelHandler (Allocator *allocator=ApiAllocator())
 
struct aws_io_message * AcquireMessageFromPool (MessageType messageType, size_t sizeHint)
 
struct aws_io_message * AcquireMaxSizeMessageForWrite ()
 
bool SendMessage (struct aws_io_message *message, ChannelDirection direction)
 
bool IncrementUpstreamReadWindow (size_t windowUpdateSize)
 
void OnShutdownComplete (ChannelDirection direction, int errorCode, bool freeScarceResourcesImmediately)
 
size_t DownstreamReadWindow () const
 
size_t UpstreamMessageOverhead () const
 
struct aws_channel_slot * GetSlot () const
 

Friends

aws_byte_buf() aws_tls_handler_protocol (aws_channel_handler *)
 

Additional Inherited Members

- Public Attributes inherited from Aws::Crt::Io::ChannelHandler
 s_ProcessReadMessage
 
 s_ProcessWriteMessage
 
 s_IncrementReadWindow
 
 s_ProcessShutdown
 
 s_InitialWindowSize
 
 s_MessageOverhead
 
 s_ResetStatistics
 
 s_GatherStatistics
 
- Protected Attributes inherited from Aws::Crt::Io::ChannelHandler
struct aws_channel_handler m_handler
 
Allocatorm_allocator
 

Detailed Description

BYO_CRYPTO: TLS channel-handler base class.

Constructor & Destructor Documentation

◆ ~TlsChannelHandler()

Aws::Crt::Io::TlsChannelHandler::~TlsChannelHandler ( )
virtual

◆ TlsChannelHandler()

Aws::Crt::Io::TlsChannelHandler::TlsChannelHandler ( struct aws_channel_slot *  slot,
const struct aws_tls_connection_options &  options,
Allocator allocator = ApiAllocator() 
)
protected

Member Function Documentation

◆ CompleteTlsNegotiation()

void Aws::Crt::Io::TlsChannelHandler::CompleteTlsNegotiation ( int  errorCode)
protected

Invoke this function from inside your handler after TLS negotiation completes. errorCode == AWS_ERROR_SUCCESS or 0 means the session was successfully established and the connection should continue on.

◆ GetProtocol()

virtual String Aws::Crt::Io::TlsChannelHandler::GetProtocol ( ) const
pure virtual
Returns
negotiated protocol (or empty string if no agreed upon protocol)

Friends And Related Function Documentation

◆ aws_tls_handler_protocol

aws_byte_buf() aws_tls_handler_protocol ( aws_channel_handler *  )
friend

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