主从同步,实现新的更改应用到slave上,实现同步slave未上线时间的更改。
This commit is contained in:
6
server.h
6
server.h
@@ -5,6 +5,8 @@
|
||||
#ifndef __SERVER_H__
|
||||
#define __SERVER_H__
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#define BUFFER_LENGTH 4096
|
||||
|
||||
#define ENABLE_HTTP 0
|
||||
@@ -31,6 +33,10 @@ struct conn {
|
||||
RCALLBACK accept_callback;
|
||||
} r_action;
|
||||
|
||||
int is_from_master;
|
||||
|
||||
pthread_mutex_t g_sync_lock;
|
||||
|
||||
int status;
|
||||
#if 1 // websocket
|
||||
char *payload;
|
||||
|
||||
Reference in New Issue
Block a user