主从同步,实现新的更改应用到slave上,实现同步slave未上线时间的更改。

This commit is contained in:
1iaan
2026-01-11 13:58:11 +00:00
parent 1a7c1c172c
commit 7525492ee1
9 changed files with 355 additions and 19 deletions

View File

@@ -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;