mirror of
https://github.com/fumiama/simple-dict.git
synced 2026-06-27 07:20:25 +08:00
优化代码结构
This commit is contained in:
1
dict.c
1
dict.c
@@ -3,6 +3,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <simplemd5.h>
|
#include <simplemd5.h>
|
||||||
#include "dict.h"
|
#include "dict.h"
|
||||||
|
#include "server.h"
|
||||||
|
|
||||||
static uint8_t lock = 0;
|
static uint8_t lock = 0;
|
||||||
static char* filepath;
|
static char* filepath;
|
||||||
|
|||||||
4
server.c
4
server.c
@@ -12,6 +12,7 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <simple_protobuf.h>
|
#include <simple_protobuf.h>
|
||||||
|
#include "server.h"
|
||||||
#include "dict.h"
|
#include "dict.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
@@ -29,9 +30,6 @@
|
|||||||
static struct sockaddr_in client_addr;
|
static struct sockaddr_in client_addr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define THREADCNT 16
|
|
||||||
#define MAXWAITSEC 10
|
|
||||||
|
|
||||||
struct THREADTIMER {
|
struct THREADTIMER {
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
time_t touch;
|
time_t touch;
|
||||||
|
|||||||
Reference in New Issue
Block a user