|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
Ring consensus state (Host-Mediated Proactive Election) More...
#include <src/discovery/session.h>
Data Fields | |
| uint8_t | future_host_id [16] |
| Who will host if current host dies. | |
| char | future_host_address [64] |
| Where to connect. | |
| uint16_t | future_host_port |
| Port number. | |
| uint8_t | future_host_connection_type |
| acip_connection_type_t (DIRECT, UPNP, STUN, TURN) | |
| bool | am_future_host |
| Am I the elected future host? | |
| uint64_t | future_host_elected_round |
| Which 5-minute round this was elected in. | |
| uint64_t | last_ring_round_ms |
| When host last ran election (for 5-min timer) | |
Ring consensus state (Host-Mediated Proactive Election)
NEW SIMPLIFIED DESIGN:
Participants just need to store the pre-elected future host info. No ring topology, no quorum leader rotation, no P2P collection.
| bool ring_consensus_t::am_future_host |
Am I the elected future host?
Definition at line 55 of file session.h.
Referenced by discovery_session_handle_host_disconnect(), discovery_session_init_ring(), and discovery_session_is_future_host().
| char ring_consensus_t::future_host_address[64] |
Where to connect.
Definition at line 52 of file session.h.
Referenced by discovery_session_connect_to_future_host(), discovery_session_get_future_host(), and discovery_session_handle_host_disconnect().
| uint8_t ring_consensus_t::future_host_connection_type |
acip_connection_type_t (DIRECT, UPNP, STUN, TURN)
Definition at line 54 of file session.h.
Referenced by discovery_session_connect_to_future_host(), and discovery_session_get_future_host().
| uint64_t ring_consensus_t::future_host_elected_round |
| uint8_t ring_consensus_t::future_host_id[16] |
Who will host if current host dies.
Definition at line 51 of file session.h.
Referenced by discovery_session_connect_to_future_host(), discovery_session_get_future_host(), discovery_session_handle_host_disconnect(), and discovery_session_init_ring().
| uint16_t ring_consensus_t::future_host_port |
Port number.
Definition at line 53 of file session.h.
Referenced by discovery_session_connect_to_future_host(), discovery_session_get_future_host(), and discovery_session_handle_host_disconnect().
| uint64_t ring_consensus_t::last_ring_round_ms |
When host last ran election (for 5-min timer)
Definition at line 59 of file session.h.
Referenced by discovery_session_init_ring(), and discovery_session_start_ring_round().