Skip to content

Commit 0a080b4

Browse files
committed
fix: enhance documentation for protocol and state management variables in tcpmux.c
Signed-off-by: Dengfeng Liu <[email protected]>
1 parent 32b765e commit 0a080b4

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

tcpmux.c

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,23 @@
3737
#define MIN(a, b) ((a) < (b) ? (a) : (b))
3838
#endif
3939

40-
static uint8_t proto_version = 0;
41-
static uint8_t remote_go_away;
42-
static uint8_t local_go_away;
43-
static uint32_t g_session_id = 1;
44-
static struct tmux_stream *cur_stream = NULL;
45-
static struct tmux_stream *all_stream;
40+
/**
41+
* @brief Protocol and state management variables
42+
*/
43+
static uint8_t proto_version = 0; /* Protocol version number */
44+
static uint8_t remote_go_away = 0; /* Flag indicating remote end wants to close */
45+
static uint8_t local_go_away = 0; /* Flag indicating local end wants to close */
46+
47+
/**
48+
* @brief Session management variables
49+
*/
50+
static uint32_t g_session_id = 1; /* Global session ID counter (starts at 1) */
51+
52+
/**
53+
* @brief Stream management variables
54+
*/
55+
static struct tmux_stream *cur_stream = NULL; /* Currently active stream */
56+
static struct tmux_stream *all_stream = NULL; /* Hash table of all streams */
4657

4758
/**
4859
* @brief Adds a stream to the hash table of all streams.

0 commit comments

Comments
 (0)