|
ImagingTools Core SDK
|
Simple interface for connection lifecycle control. More...
#include <IConnectionController.h>
Inherits istd::IPolymorphic.
Inherited by imtclientgql::CWebSocketClientComp [virtual].
Public Member Functions | |
| virtual bool | Connect ()=0 |
| Establish a connection. | |
| virtual bool | Disconnect ()=0 |
| Close the connection. | |
Simple interface for connection lifecycle control.
IConnectionController provides a minimal contract for components that need to establish and tear down network connections. This interface is intentionally lightweight and generic, suitable for various connection types (TCP, WebSocket, database connections, etc.).
Connection States:
Lifecycle:
Components implementing this interface typically include:
Definition at line 66 of file IConnectionController.h.
|
pure virtual |
Establish a connection.
Initiates the connection establishment process. Implementation-specific details may include DNS resolution, TCP handshake, authentication, protocol negotiation, etc.
true if connection was established successfully; false on failure. true without re-establishing the connection (idempotent behavior).
|
pure virtual |
Close the connection.
Gracefully terminates the connection. Implementations should clean up resources, close sockets, and notify peers if applicable.
true if disconnection was successful; false on error. true without error (idempotent behavior).