Network System 0.1.1
High-performance modular networking library for scalable client-server applications
Loading...
Searching...
No Matches
session_traits.h
Go to the documentation of this file.
1/*****************************************************************************
2BSD 3-Clause License
3
4Copyright (c) 2025, kcenon
5All rights reserved.
6*****************************************************************************/
7
8#pragma once
9
12} // namespace kcenon::network::session
13
14namespace kcenon::network::core {
15
16class ws_connection;
17
29template <typename SessionType>
32 static constexpr bool has_activity_tracking = false;
33
35 static constexpr bool stop_on_clear = false;
36
38 static constexpr const char* id_prefix = "session_";
39};
40
47template <>
49 static constexpr bool has_activity_tracking = true;
50 static constexpr bool stop_on_clear = true;
51 static constexpr const char* id_prefix = "session_";
52};
53
60template <>
62 static constexpr bool has_activity_tracking = false;
63 static constexpr bool stop_on_clear = false;
64 static constexpr const char* id_prefix = "ws_conn_";
65};
66
67} // namespace kcenon::network::core
Represents a client session on the server.
Definition tcp.cppm:394
Represents a WebSocket connection to a client.
kcenon::network::session::messaging_session messaging_session
Customization point for session manager behavior.
static constexpr const char * id_prefix
ID prefix for auto-generated session IDs.
static constexpr bool stop_on_clear
Call session's stop method when clearing all sessions.
static constexpr bool has_activity_tracking
Enable activity timestamp tracking (required for idle cleanup)