AbstractClientTransport
Abstract base class representing a client-side transport layer for communication.
This class is responsible for managing the lifecycle of a transport instance, including its initialization, state transitions, message transmission, and graceful shutdown. It provides a framework for implementing specific transport mechanisms by defining abstract methods that subclasses must implement.
Thread-safety is achieved through the use of atomic references to manage transport state transitions and to ensure invariants during lifecycle events. The initialization and shutdown logic is designed to handle async workflows, ensuring proper resource cleanup in the case of failure or cancellation.