1
0
mirror of https://github.com/fumiama/simple-dict.git synced 2026-06-08 12:00:24 +08:00

优化代码结构

This commit is contained in:
fumiama
2021-12-08 20:25:23 +08:00
parent 9fb518368a
commit 21d0e04670
3 changed files with 9 additions and 3 deletions

1
dict.c
View File

@@ -3,6 +3,7 @@
#include <stdlib.h>
#include <simplemd5.h>
#include "dict.h"
#include "server.h"
static uint8_t lock = 0;
static char* filepath;

View File

@@ -12,6 +12,7 @@
#include <signal.h>
#include <time.h>
#include <simple_protobuf.h>
#include "server.h"
#include "dict.h"
#include "config.h"
@@ -29,9 +30,6 @@
static struct sockaddr_in client_addr;
#endif
#define THREADCNT 16
#define MAXWAITSEC 10
struct THREADTIMER {
uint32_t index;
time_t touch;

7
server.h Normal file
View File

@@ -0,0 +1,7 @@
#ifndef _SERVER_H_
#define _SERVER_H_
#define THREADCNT 16
#define MAXWAITSEC 10
#endif /* _SERVER_H_ */