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

C++20 concepts for compile-time type validation in network_system. More...

Classes

class  datagram_receive_guard
 RAII guard for datagram socket receive loop. More...
 
class  socket_read_guard
 RAII guard for socket read loop. More...
 

Concepts

concept  ByteBuffer
 A type that can serve as a network data buffer.
 
concept  MutableByteBuffer
 A mutable byte buffer that can be resized.
 
concept  DataReceiveHandler
 A callback type for handling received data.
 
concept  ErrorHandler
 A callback type for handling network errors.
 
concept  ConnectionHandler
 A callback type for handling connection state changes.
 
concept  SessionHandler
 A callback type for handling session events with a session pointer.
 
concept  SessionDataHandler
 A callback type for handling data received on a specific session.
 
concept  SessionErrorHandler
 A callback type for handling errors on a specific session.
 
concept  DisconnectionHandler
 A callback type for handling disconnection events with session ID.
 
concept  RetryCallback
 A callback type for reconnection attempt notifications.
 
concept  NetworkClient
 A type that satisfies basic network client requirements.
 
concept  NetworkServer
 A type that satisfies basic network server requirements.
 
concept  NetworkSession
 A type that represents a network session.
 
concept  DataTransformer
 A type that can transform data (e.g., compression, encryption).
 
concept  ReversibleDataTransformer
 A transformer that supports both forward and reverse operations.
 
concept  Duration
 A type that represents a time duration.
 
concept  AsyncCompletionHandler
 Standard completion handler signature for async operations.
 
concept  ErrorCompletionHandler
 Error-only completion handler signature.
 
concept  Socket
 Base concept for all socket types.
 
concept  StreamSocket
 Concept for connected stream sockets (TCP, TLS).
 
concept  DatagramSocket
 Concept for connectionless datagram sockets (UDP).
 
concept  DatagramSocketWithEndpoint
 Datagram socket with specific endpoint type.
 
concept  MessageSocket
 Concept for message-oriented sockets (WebSocket).
 
concept  BackpressureAwareSocket
 Concept for sockets with backpressure control.
 
concept  MetricsAwareSocket
 Concept for sockets with runtime metrics.
 
concept  SecureSocket
 Concept for TLS/SSL-enabled sockets.
 

Detailed Description

C++20 concepts for compile-time type validation in network_system.

This namespace contains all concept definitions used throughout the network_system library. Concepts provide:

  • Compile-time type checking with clear error messages
  • Self-documenting interface requirements
  • Simplified template constraints
  • Better IDE support for auto-completion

Concept Categories:

Data Buffers:

Callbacks:

Network Components:

Pipeline:

Utility:

When common_system is available:

  • NetworkResultHandler: Result-aware callbacks
  • AsyncNetworkCallback: Async-suitable callbacks