auto-connect + GUI per-channel indicators
- chat_core_connect_auto: direct ETCP connect from SQLite (no BGP) - auto_connect: parallel connect to peers with 3s timeout, retry 10s - RTT saved to node_addresses on disconnect - vertical status bar + circle badge with online count per channel - ChannelListView prevents deselection
This commit is contained in:
1 parent
1a0229fd4f
commit
dccf54b30b
22 files changed
+909
-10
No files matched your search
@@ -0,0 +1,35 @@
|
||||
#ifndef NTP_NODE_TIME_H
|
||||
#define NTP_NODE_TIME_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct UTUN_INSTANCE;
|
||||
|
||||
#define NTP_NODE_MAX_PEERS 32
|
||||
|
||||
#define NTP_NODE_DRIFT_WARN_US 2000000LL // 2 seconds
|
||||
#define NTP_NODE_DRIFT_ERROR_US 10000000LL // 10 seconds
|
||||
|
||||
struct NTP_NODE_PEER {
|
||||
uint64_t node_id;
|
||||
int64_t offset_us; // my_time_recv - peer_time (positive = my clock ahead)
|
||||
};
|
||||
|
||||
struct NTP_NODE_TIME {
|
||||
struct NTP_NODE_PEER peers[NTP_NODE_MAX_PEERS];
|
||||
int peer_count;
|
||||
};
|
||||
|
||||
int ntp_node_time_init(struct UTUN_INSTANCE* inst);
|
||||
void ntp_node_time_destroy(struct UTUN_INSTANCE* inst);
|
||||
void ntp_node_sync_peers(struct UTUN_INSTANCE* inst);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // NTP_NODE_TIME_H
|
||||
Reference in new issue
Block a user