Skip to content

Commit

Permalink
fix: enhance documentation for protocol and state management variable…
Browse files Browse the repository at this point in the history
…s in tcpmux.c

Signed-off-by: Dengfeng Liu <[email protected]>
  • Loading branch information
liudf0716 committed Nov 13, 2024
1 parent 32b765e commit 0a080b4
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions tcpmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,23 @@
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif

static uint8_t proto_version = 0;
static uint8_t remote_go_away;
static uint8_t local_go_away;
static uint32_t g_session_id = 1;
static struct tmux_stream *cur_stream = NULL;
static struct tmux_stream *all_stream;
/**
* @brief Protocol and state management variables
*/
static uint8_t proto_version = 0; /* Protocol version number */
static uint8_t remote_go_away = 0; /* Flag indicating remote end wants to close */
static uint8_t local_go_away = 0; /* Flag indicating local end wants to close */

/**
* @brief Session management variables
*/
static uint32_t g_session_id = 1; /* Global session ID counter (starts at 1) */

/**
* @brief Stream management variables
*/
static struct tmux_stream *cur_stream = NULL; /* Currently active stream */
static struct tmux_stream *all_stream = NULL; /* Hash table of all streams */

/**
* @brief Adds a stream to the hash table of all streams.
Expand Down

0 comments on commit 0a080b4

Please sign in to comment.