|
ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
|
Master context for connection attempt with fallback. More...
#include <src/client/connection_state.h>
Data Fields | |
| connection_state_t | current_state |
| Current connection state. | |
| connection_state_t | previous_state |
| Previous state (for debugging) | |
| time_t | stage_start_time |
| When current stage began. | |
| uint32_t | current_stage_timeout_seconds |
| Timeout for current stage (3/8/15) | |
| acip_transport_t * | tcp_transport |
| TCP transport (Stage 1) - may be NULL. | |
| acip_transport_t * | acds_transport |
| ACDS signaling transport (Stages 2/3) - may be NULL. | |
| acip_transport_t * | webrtc_transport |
| WebRTC transport (Stages 2/3) - may be NULL. | |
| acip_transport_t * | active_transport |
| Currently active transport (whichever succeeded) | |
| struct tcp_client * | tcp_client_instance |
| TCP client instance (Direct TCP only) - owned by context. | |
| connection_session_context_t | session_ctx |
| Session context from ACDS. | |
| webrtc_peer_manager_t * | peer_manager |
| WebRTC peer manager (Stages 2/3) | |
| mutex_t | webrtc_mutex |
| Mutex for WebRTC callback synchronization. | |
| cond_t | webrtc_ready_cond |
| Condition variable for on_transport_ready. | |
| bool | webrtc_transport_received |
| Flag: transport_ready callback fired. | |
| connection_stun_turn_config_t | stun_turn_cfg |
| STUN/TURN server config. | |
| bool | prefer_webrtc |
| –prefer-webrtc flag | |
| bool | no_webrtc |
| –no-webrtc flag (disable WebRTC, TCP only) | |
| bool | webrtc_skip_stun |
| –webrtc-skip-stun flag (skip Stage 2 STUN) | |
| bool | webrtc_disable_turn |
| –webrtc-disable-turn flag (skip Stage 3 TURN) | |
| uint32_t | reconnect_attempt |
| Reconnection attempt number (1st, 2nd, etc.) | |
| uint32_t | stage_failures |
| How many stages have failed. | |
| uint32_t | total_transitions |
| Total state transitions (for metrics) | |
Master context for connection attempt with fallback.
Orchestrates the entire connection flow including:
Created at client startup, passed through all connection stages. Persists across reconnection attempts to maintain state.
Definition at line 140 of file connection_state.h.
| acip_transport_t* connection_attempt_context_t::acds_transport |
ACDS signaling transport (Stages 2/3) - may be NULL.
Definition at line 160 of file connection_state.h.
| acip_transport_t* connection_attempt_context_t::active_transport |
Currently active transport (whichever succeeded)
Definition at line 162 of file connection_state.h.
Referenced by client_main(), and connection_context_cleanup().
| uint32_t connection_attempt_context_t::current_stage_timeout_seconds |
Timeout for current stage (3/8/15)
Definition at line 153 of file connection_state.h.
Referenced by connection_check_timeout(), connection_context_init(), and connection_state_transition().
| connection_state_t connection_attempt_context_t::current_state |
Current connection state.
Definition at line 145 of file connection_state.h.
Referenced by connection_check_timeout(), connection_context_init(), and connection_state_transition().
| bool connection_attempt_context_t::no_webrtc |
–no-webrtc flag (disable WebRTC, TCP only)
Definition at line 192 of file connection_state.h.
Referenced by connection_attempt_with_fallback(), and connection_context_init().
| webrtc_peer_manager_t* connection_attempt_context_t::peer_manager |
WebRTC peer manager (Stages 2/3)
Definition at line 171 of file connection_state.h.
Referenced by connection_context_cleanup().
| bool connection_attempt_context_t::prefer_webrtc |
–prefer-webrtc flag
Definition at line 191 of file connection_state.h.
Referenced by connection_attempt_with_fallback(), and connection_context_init().
| connection_state_t connection_attempt_context_t::previous_state |
Previous state (for debugging)
Definition at line 146 of file connection_state.h.
Referenced by connection_context_init(), and connection_state_transition().
| uint32_t connection_attempt_context_t::reconnect_attempt |
Reconnection attempt number (1st, 2nd, etc.)
Definition at line 200 of file connection_state.h.
Referenced by client_main(), connection_attempt_with_fallback(), and connection_context_init().
| connection_session_context_t connection_attempt_context_t::session_ctx |
Session context from ACDS.
Definition at line 170 of file connection_state.h.
Referenced by client_main().
| uint32_t connection_attempt_context_t::stage_failures |
How many stages have failed.
Definition at line 201 of file connection_state.h.
Referenced by connection_context_init().
| time_t connection_attempt_context_t::stage_start_time |
When current stage began.
Definition at line 152 of file connection_state.h.
Referenced by connection_check_timeout(), connection_context_init(), and connection_state_transition().
| connection_stun_turn_config_t connection_attempt_context_t::stun_turn_cfg |
STUN/TURN server config.
Definition at line 185 of file connection_state.h.
| struct tcp_client* connection_attempt_context_t::tcp_client_instance |
TCP client instance (Direct TCP only) - owned by context.
Definition at line 164 of file connection_state.h.
Referenced by connection_context_cleanup().
| acip_transport_t* connection_attempt_context_t::tcp_transport |
TCP transport (Stage 1) - may be NULL.
Definition at line 159 of file connection_state.h.
Referenced by connection_context_cleanup().
| uint32_t connection_attempt_context_t::total_transitions |
Total state transitions (for metrics)
Definition at line 202 of file connection_state.h.
Referenced by connection_context_init(), and connection_state_transition().
| bool connection_attempt_context_t::webrtc_disable_turn |
–webrtc-disable-turn flag (skip Stage 3 TURN)
Definition at line 194 of file connection_state.h.
Referenced by connection_attempt_with_fallback(), and connection_context_init().
| mutex_t connection_attempt_context_t::webrtc_mutex |
Mutex for WebRTC callback synchronization.
Definition at line 177 of file connection_state.h.
| cond_t connection_attempt_context_t::webrtc_ready_cond |
Condition variable for on_transport_ready.
Definition at line 178 of file connection_state.h.
| bool connection_attempt_context_t::webrtc_skip_stun |
–webrtc-skip-stun flag (skip Stage 2 STUN)
Definition at line 193 of file connection_state.h.
Referenced by connection_attempt_with_fallback(), and connection_context_init().
| acip_transport_t* connection_attempt_context_t::webrtc_transport |
WebRTC transport (Stages 2/3) - may be NULL.
Definition at line 161 of file connection_state.h.
Referenced by connection_context_cleanup().
| bool connection_attempt_context_t::webrtc_transport_received |
Flag: transport_ready callback fired.
Definition at line 179 of file connection_state.h.