Network System 0.1.1
High-performance modular networking library for scalable client-server applications
Loading...
Searching...
No Matches
kcenon::network::config::network_system_config Struct Reference

Configuration for network_system with external dependencies. More...

#include <network_system_config.h>

Collaboration diagram for kcenon::network::config::network_system_config:
Collaboration graph

Public Attributes

network_config runtime {network_config::production()}
 Runtime configuration settings (thread pool, logger, monitoring config)
 
std::shared_ptr< kcenon::common::interfaces::IExecutor > executor
 External executor/thread pool (nullptr = create internal)
 
std::shared_ptr< kcenon::common::interfaces::ILogger > logger
 External logger instance (nullptr = create internal)
 
std::shared_ptr< kcenon::common::interfaces::IMonitor > monitor
 External monitoring instance (nullptr = create internal if enabled)
 

Detailed Description

Configuration for network_system with external dependencies.

Use this configuration when integrating the network system with existing application infrastructure. This allows sharing thread pools, loggers, and monitoring components with other parts of your application.

Example usage:

// Create shared infrastructure
auto app_executor = std::make_shared<MyExecutor>();
auto app_logger = std::make_shared<MyLogger>();
// Configure network system to use shared resources
cfg.executor = app_executor;
cfg.logger = app_logger;
auto result = kcenon::network::initialize(cfg);
VoidResult initialize()
Initialize the network system with default production configuration.
static network_config production()
Create production configuration.
Configuration for network_system with external dependencies.
std::shared_ptr< kcenon::common::interfaces::IExecutor > executor
External executor/thread pool (nullptr = create internal)
network_config runtime
Runtime configuration settings (thread pool, logger, monitoring config)
std::shared_ptr< kcenon::common::interfaces::ILogger > logger
External logger instance (nullptr = create internal)
Note
Components not provided (nullptr) will be created internally based on the runtime configuration settings.
See also
network_config For standalone usage with internal resources
initialize(const network_system_config&) For initialization

Definition at line 68 of file network_system_config.h.

Member Data Documentation

◆ executor

std::shared_ptr<kcenon::common::interfaces::IExecutor> kcenon::network::config::network_system_config::executor

External executor/thread pool (nullptr = create internal)

Definition at line 73 of file network_system_config.h.

Referenced by kcenon::network::initialize().

◆ logger

std::shared_ptr<kcenon::common::interfaces::ILogger> kcenon::network::config::network_system_config::logger

External logger instance (nullptr = create internal)

Definition at line 76 of file network_system_config.h.

Referenced by kcenon::network::initialize().

◆ monitor

std::shared_ptr<kcenon::common::interfaces::IMonitor> kcenon::network::config::network_system_config::monitor

External monitoring instance (nullptr = create internal if enabled)

Definition at line 79 of file network_system_config.h.

Referenced by kcenon::network::initialize().

◆ runtime

network_config kcenon::network::config::network_system_config::runtime {network_config::production()}

Runtime configuration settings (thread pool, logger, monitoring config)

Definition at line 70 of file network_system_config.h.

Referenced by kcenon::network::initialize().


The documentation for this struct was generated from the following file: