|
Network System 0.1.1
High-performance modular networking library for scalable client-server applications
|
Callback functions for connection events. More...
#include <types.h>

Public Attributes | |
| std::function< void()> | on_connected |
| Called when connection is established. | |
| std::function< void(std::span< const std::byte >)> | on_data |
| Called when data is received (raw bytes) | |
| std::function< void()> | on_disconnected |
| Called when connection is closed. | |
| std::function< void(std::error_code)> | on_error |
| Called when an error occurs. | |
Callback functions for connection events.
Groups all callback functions that can be registered for connection lifecycle events. All callbacks are optional (can be empty).
Callbacks may be invoked from I/O threads. Implementations must ensure their callbacks are thread-safe if they access shared state.
| std::function<void()> kcenon::network::unified::connection_callbacks::on_connected |
Called when connection is established.
Definition at line 156 of file types.h.
Referenced by main().
| std::function<void(std::span<const std::byte>)> kcenon::network::unified::connection_callbacks::on_data |
Called when data is received (raw bytes)
Definition at line 159 of file types.h.
Referenced by main().
| std::function<void()> kcenon::network::unified::connection_callbacks::on_disconnected |
Called when connection is closed.
Definition at line 162 of file types.h.
Referenced by kcenon::network::unified::adapters::udp_connection_adapter::close(), and main().
| std::function<void(std::error_code)> kcenon::network::unified::connection_callbacks::on_error |
Called when an error occurs.
Definition at line 165 of file types.h.
Referenced by main().