AWS IoT Device SDK C++ v2: Aws::Eventstreamrpc::ConnectionLifecycleHandler 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::Eventstreamrpc::ConnectionLifecycleHandler Class Reference

`#include <EventStreamClient.h>`

## Public Member Functions
virtual void | OnConnectCallback ()
virtual void | OnDisconnectCallback (RpcError status)
virtual bool | OnErrorCallback (RpcError status)
virtual void | OnPingCallback (const Crt::List< EventStreamHeader > &headers, const Crt::Optional< Crt::ByteBuf > &payload)

## Member Function Documentation

## ◆ OnConnectCallback()

void Aws::Eventstreamrpc::ConnectionLifecycleHandler::OnConnectCallback | ( |  | ) |
| virtual

This callback is only invoked upon receiving a CONNECT_ACK with the CONNECTION_ACCEPTED flag set by the server. Therefore, once this callback is invoked, the `ClientConnection` is ready to be used for sending messages.

## ◆ OnDisconnectCallback()

void Aws::Eventstreamrpc::ConnectionLifecycleHandler::OnDisconnectCallback | ( | RpcError | status | ) |
| virtual

Invoked upon connection shutdown.

Parameters

  status | The status upon disconnection. It can be treated as a bool with true implying a successful disconnection.

## ◆ OnErrorCallback()

bool Aws::Eventstreamrpc::ConnectionLifecycleHandler::OnErrorCallback | ( | RpcError | status | ) |
| virtual

Invoked upon receiving an error. Use the return value to determine whether or not to force the connection to close. Keep in mind that once closed, the `ClientConnection` can no longer send messages.

Parameters

  status | The status upon disconnection. It can be treated as a bool with true implying a successful disconnection.

## ◆ OnPingCallback()

void Aws::Eventstreamrpc::ConnectionLifecycleHandler::OnPingCallback | ( | const Crt::List< EventStreamHeader > & | headers,
|  | const Crt::Optional< Crt::ByteBuf > & | payload
| ) |  |
| virtual

Invoked upon receiving a ping from the server. The `headers` and `payload` refer to what is contained in the ping message.

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

- eventstream_rpc/include/aws/eventstreamrpc/EventStreamClient.h
- eventstream_rpc/source/EventStreamClient.cpp