#ifndef __REPLICA_H__ #define __REPLICA_H__ #define MAX_IP_LEN 64 enum { EVENT_SSYNC = 1, EVENT_SREADY = 2, }; struct replica_event { uint32_t type; uint32_t _pad; union { struct { uint64_t seq; // SYNC_SEQ:从这个 seq 开始增量 int32_t port; uint32_t ip_len; char ip[MAX_IP_LEN]; } sync; }; }; #endif