Network System 0.1.1
High-performance modular networking library for scalable client-server applications
Loading...
Searching...
No Matches
i_network_component.h
Go to the documentation of this file.
1// BSD 3-Clause License
2// Copyright (c) 2024, 🍀☀🌕🌥 🌊
3// See the LICENSE file in the project root for full license information.
4
11#pragma once
12
22{
23
45 {
46 public:
50 virtual ~i_network_component() = default;
51
52 // Non-copyable, non-movable (interface class)
57
58 protected:
61
69 [[nodiscard]] virtual auto is_running() const -> bool = 0;
70
80 virtual auto wait_for_stop() -> void = 0;
81 };
82
83} // namespace kcenon::network::interfaces
Base interface for all network components.
i_network_component(i_network_component &&)=delete
i_network_component()=default
Default constructor (only for derived classes)
virtual auto is_running() const -> bool=0
Checks if the component is currently running.
i_network_component & operator=(i_network_component &&)=delete
i_network_component & operator=(const i_network_component &)=delete
virtual ~i_network_component()=default
Virtual destructor for proper cleanup of derived classes.
virtual auto wait_for_stop() -> void=0
Blocks until the component has stopped.
i_network_component(const i_network_component &)=delete