📄 global.c
字号:
#include "global.h"
bucket_list hash_table[SIZE];/*a hash table to record the information
*for the user and it used the user
name to index the information*/
addr_list addr_table[SIZE]; /*a hash table to record the information
for the user and it used the user
file descriptor to index the information*/
int on_line_num = 0; /*the number of user on line*/
int max_user = 500; /*the max number of user allow to
connect to the server at the same time*/
pthread_mutex_t num_mutex; /*make sure the correctness of the number
of user*/
pthread_mutex_t name_mutex; /*make sure the correctness of the hash
table hash_table[]*/
pthread_mutex_t addr_mutex; /*make sure the correctness of the hash
table addr_table[]*/
pthread_mutex_t host_mutex; /*make sure the correctness of the link
list of host*/
host_list * host_head = NULL; /*point to the head of the host link list*/
host_list * host_tail = NULL; /*point to the tail of the host link list*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -