Network System 0.1.1
High-performance modular networking library for scalable client-server applications
Loading...
Searching...
No Matches
network_concepts.h File Reference

C++20 concepts for network_system types and callbacks. More...

#include <concepts>
#include <cstdint>
#include <functional>
#include <memory>
#include <string>
#include <system_error>
#include <type_traits>
#include <vector>
Include dependency graph for network_concepts.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  kcenon
 
namespace  kcenon::network
 Main namespace for all Network System components.
 
namespace  kcenon::network::concepts
 C++20 concepts for compile-time type validation in network_system.
 

Concepts

concept  kcenon::network::concepts::ByteBuffer
 A type that can serve as a network data buffer.
 
concept  kcenon::network::concepts::MutableByteBuffer
 A mutable byte buffer that can be resized.
 
concept  kcenon::network::concepts::DataReceiveHandler
 A callback type for handling received data.
 
concept  kcenon::network::concepts::ErrorHandler
 A callback type for handling network errors.
 
concept  kcenon::network::concepts::ConnectionHandler
 A callback type for handling connection state changes.
 
concept  kcenon::network::concepts::SessionHandler
 A callback type for handling session events with a session pointer.
 
concept  kcenon::network::concepts::SessionDataHandler
 A callback type for handling data received on a specific session.
 
concept  kcenon::network::concepts::SessionErrorHandler
 A callback type for handling errors on a specific session.
 
concept  kcenon::network::concepts::DisconnectionHandler
 A callback type for handling disconnection events with session ID.
 
concept  kcenon::network::concepts::RetryCallback
 A callback type for reconnection attempt notifications.
 
concept  kcenon::network::concepts::NetworkClient
 A type that satisfies basic network client requirements.
 
concept  kcenon::network::concepts::NetworkServer
 A type that satisfies basic network server requirements.
 
concept  kcenon::network::concepts::NetworkSession
 A type that represents a network session.
 
concept  kcenon::network::concepts::DataTransformer
 A type that can transform data (e.g., compression, encryption).
 
concept  kcenon::network::concepts::ReversibleDataTransformer
 A transformer that supports both forward and reverse operations.
 
concept  kcenon::network::concepts::Duration
 A type that represents a time duration.
 

Detailed Description

C++20 concepts for network_system types and callbacks.

This header provides concepts for compile-time validation of network-related types, improving error messages and code documentation.

Requirements:

  • C++20 compiler with concepts support
  • GCC 10+, Clang 10+, MSVC 2022+
See also
common_system concepts for Result/Optional and callable concepts

Definition in file network_concepts.h.