![]() |
Kurlyk
|
Manages WebSocket client instances, providing centralized control for processing, resetting, and lifecycle management. More...
#include <WebSocketManager.hpp>
Public Member Functions | |
void | process () override |
Processes all active WebSocket clients managed by this instance. | |
void | shutdown () override |
Shuts down all active WebSocket clients managed by this instance. | |
const bool | is_loaded () const override |
Checks if any WebSocket client is currently running. | |
std::shared_ptr< IWebSocketClient > | create_client () |
Creates and returns a new WebSocket client instance based on the platform defined by compilation flags. | |
![]() | |
virtual | ~INetworkTaskManager ()=default |
Static Public Member Functions | |
static WebSocketManager & | get_instance () |
Get the singleton instance of WebSocketManager. | |
Private Member Functions | |
WebSocketManager ()=default | |
Private constructor to enforce singleton pattern. | |
virtual | ~WebSocketManager ()=default |
Private destructor to enforce singleton pattern. | |
WebSocketManager (const WebSocketManager &)=delete | |
Deleted copy constructor to enforce the singleton pattern. | |
WebSocketManager & | operator= (const WebSocketManager &)=delete |
Deleted copy assignment operator to enforce the singleton pattern. | |
Private Attributes | |
std::mutex | m_client_list_mutex |
Mutex for synchronizing access to the client list. | |
std::list< std::weak_ptr< IWebSocketClient > > | m_client_list |
List of WebSocket clients managed by the WebSocketManager. | |
Manages WebSocket client instances, providing centralized control for processing, resetting, and lifecycle management.
Definition at line 18 of file WebSocketManager.hpp.
|
privatedefault |
Private constructor to enforce singleton pattern.
|
privatedelete |
Deleted copy constructor to enforce the singleton pattern.
|
inline |
Creates and returns a new WebSocket client instance based on the platform defined by compilation flags.
Definition at line 71 of file WebSocketManager.hpp.
|
inlinestatic |
Get the singleton instance of WebSocketManager.
Definition at line 23 of file WebSocketManager.hpp.
|
inlineoverridevirtual |
Checks if any WebSocket client is currently running.
Implements kurlyk::core::INetworkTaskManager.
Definition at line 59 of file WebSocketManager.hpp.
|
privatedelete |
Deleted copy assignment operator to enforce the singleton pattern.
|
inlineoverridevirtual |
Processes all active WebSocket clients managed by this instance.
Iterates over each WebSocket client and calls its process
method to handle pending operations. Automatically removes clients that are no longer active from the internal client list.
Implements kurlyk::core::INetworkTaskManager.
Definition at line 32 of file WebSocketManager.hpp.
|
inlineoverridevirtual |
Shuts down all active WebSocket clients managed by this instance.
Iterates over each WebSocket client and calls its shutdown
method to stop and clear its state.
Implements kurlyk::core::INetworkTaskManager.
Definition at line 48 of file WebSocketManager.hpp.
|
privatevirtualdefault |
Private destructor to enforce singleton pattern.
|
private |
List of WebSocket clients managed by the WebSocketManager.
Definition at line 99 of file WebSocketManager.hpp.
|
mutableprivate |
Mutex for synchronizing access to the client list.
Definition at line 98 of file WebSocketManager.hpp.