|
ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
|
TCP client connection and state management. More...
#include <lib/network/tcp/client.h>
TCP client connection and state management.
Encapsulates all state for a single TCP client connection, including:
Definition at line 104 of file lib/network/tcp/client.h.
| asciichat_thread_t tcp_client::audio_capture_thread |
Audio capture thread handle
Definition at line 162 of file lib/network/tcp/client.h.
| bool tcp_client::audio_capture_thread_created |
Audio capture thread was successfully created
Definition at line 168 of file lib/network/tcp/client.h.
Referenced by tcp_client_create(), and tcp_client_destroy().
| atomic_bool tcp_client::audio_capture_thread_exited |
Audio capture thread has exited
Definition at line 174 of file lib/network/tcp/client.h.
Referenced by tcp_client_create(), and tcp_client_destroy().
| audio_context_t tcp_client::audio_ctx |
Audio capture and playback context
Definition at line 138 of file lib/network/tcp/client.h.
Referenced by tcp_client_create().
| tcp_client_audio_packet_t tcp_client::audio_send_queue[256] |
Queue of audio packets awaiting transmission
Definition at line 141 of file lib/network/tcp/client.h.
Referenced by tcp_client_create().
| cond_t tcp_client::audio_send_queue_cond |
Condition variable for audio queue signaling
Definition at line 153 of file lib/network/tcp/client.h.
Referenced by tcp_client_create(), and tcp_client_destroy().
| int tcp_client::audio_send_queue_head |
Write position in audio send queue (producer)
Definition at line 144 of file lib/network/tcp/client.h.
Referenced by tcp_client_create().
| bool tcp_client::audio_send_queue_initialized |
Audio send queue has been initialized
Definition at line 156 of file lib/network/tcp/client.h.
Referenced by tcp_client_create().
| mutex_t tcp_client::audio_send_queue_mutex |
Mutex protecting audio send queue access
Definition at line 150 of file lib/network/tcp/client.h.
Referenced by tcp_client_create(), and tcp_client_destroy().
| int tcp_client::audio_send_queue_tail |
Read position in audio send queue (consumer)
Definition at line 147 of file lib/network/tcp/client.h.
Referenced by tcp_client_create().
| atomic_bool tcp_client::audio_sender_should_exit |
Signal audio sender thread to exit
Definition at line 159 of file lib/network/tcp/client.h.
Referenced by tcp_client_create().
| asciichat_thread_t tcp_client::audio_sender_thread |
Audio sender thread handle
Definition at line 165 of file lib/network/tcp/client.h.
| bool tcp_client::audio_sender_thread_created |
Audio sender thread was successfully created
Definition at line 171 of file lib/network/tcp/client.h.
Referenced by tcp_client_create().
| asciichat_thread_t tcp_client::capture_thread |
Webcam capture thread handle
Definition at line 203 of file lib/network/tcp/client.h.
| bool tcp_client::capture_thread_created |
Capture thread was successfully created
Definition at line 206 of file lib/network/tcp/client.h.
Referenced by tcp_client_create(), and tcp_client_destroy().
| atomic_bool tcp_client::capture_thread_exited |
Capture thread has exited
Definition at line 209 of file lib/network/tcp/client.h.
Referenced by tcp_client_create(), and tcp_client_destroy().
| atomic_bool tcp_client::connection_active |
Connection is active and ready for I/O operations
Definition at line 113 of file lib/network/tcp/client.h.
Referenced by tcp_client_close(), tcp_client_connect(), tcp_client_create(), tcp_client_is_active(), tcp_client_send_audio_batch(), tcp_client_send_audio_opus(), tcp_client_send_audio_opus_batch(), tcp_client_send_join(), tcp_client_send_packet(), tcp_client_send_stream_start(), tcp_client_send_terminal_capabilities(), tcp_client_shutdown(), and tcp_client_signal_lost().
| atomic_bool tcp_client::connection_lost |
Connection was lost (triggers reconnection logic)
Definition at line 116 of file lib/network/tcp/client.h.
Referenced by tcp_client_cleanup(), tcp_client_connect(), tcp_client_create(), tcp_client_is_lost(), and tcp_client_signal_lost().
| crypto_handshake_context_t tcp_client::crypto_ctx |
Cryptographic handshake context
Definition at line 242 of file lib/network/tcp/client.h.
Referenced by tcp_client_create(), tcp_client_send_audio_batch(), tcp_client_send_audio_opus(), tcp_client_send_audio_opus_batch(), tcp_client_send_join(), and tcp_client_send_packet().
| bool tcp_client::crypto_initialized |
Crypto has been initialized for this connection
Definition at line 245 of file lib/network/tcp/client.h.
Referenced by tcp_client_create(), tcp_client_send_audio_batch(), tcp_client_send_audio_opus(), tcp_client_send_audio_opus_batch(), tcp_client_send_join(), and tcp_client_send_packet().
| asciichat_thread_t tcp_client::data_reception_thread |
Data reception thread handle
Definition at line 181 of file lib/network/tcp/client.h.
| bool tcp_client::data_thread_created |
Data reception thread was successfully created
Definition at line 184 of file lib/network/tcp/client.h.
Referenced by tcp_client_create(), and tcp_client_destroy().
| atomic_bool tcp_client::data_thread_exited |
Data reception thread has exited
Definition at line 187 of file lib/network/tcp/client.h.
Referenced by tcp_client_create(), and tcp_client_destroy().
| bool tcp_client::encryption_enabled |
Encryption is enabled for this connection
Definition at line 131 of file lib/network/tcp/client.h.
Referenced by tcp_client_create().
| bool tcp_client::has_tty |
Client has a TTY (not redirected output)
Definition at line 229 of file lib/network/tcp/client.h.
Referenced by tcp_client_create().
| atomic_bool tcp_client::is_first_frame_of_connection |
This is the first frame of a new connection
Definition at line 232 of file lib/network/tcp/client.h.
Referenced by tcp_client_create().
| uint32_t tcp_client::last_active_count |
Last active client count received from server
Definition at line 190 of file lib/network/tcp/client.h.
Referenced by tcp_client_create().
| uint32_t tcp_client::my_client_id |
Client ID assigned by server during initial handshake
Definition at line 122 of file lib/network/tcp/client.h.
Referenced by tcp_client_close(), tcp_client_connect(), tcp_client_create(), and tcp_client_get_id().
| asciichat_thread_t tcp_client::ping_thread |
Ping/keepalive thread handle
Definition at line 216 of file lib/network/tcp/client.h.
| bool tcp_client::ping_thread_created |
Ping thread was successfully created
Definition at line 219 of file lib/network/tcp/client.h.
Referenced by tcp_client_create(), and tcp_client_destroy().
| atomic_bool tcp_client::ping_thread_exited |
Ping thread has exited
Definition at line 222 of file lib/network/tcp/client.h.
Referenced by tcp_client_create(), and tcp_client_destroy().
| mutex_t tcp_client::send_mutex |
Mutex protecting concurrent socket send operations
Definition at line 128 of file lib/network/tcp/client.h.
Referenced by tcp_client_create(), tcp_client_destroy(), tcp_client_send_audio_batch(), tcp_client_send_audio_opus(), tcp_client_send_audio_opus_batch(), tcp_client_send_join(), and tcp_client_send_packet().
| char tcp_client::server_ip[256] |
Server IP address (for display and reconnection)
Definition at line 125 of file lib/network/tcp/client.h.
Referenced by tcp_client_cleanup(), tcp_client_connect(), and tcp_client_create().
| bool tcp_client::server_state_initialized |
Server state packet has been received and processed
Definition at line 193 of file lib/network/tcp/client.h.
Referenced by tcp_client_create().
| bool tcp_client::should_clear_before_next_frame |
Terminal should be cleared before next frame display
Definition at line 196 of file lib/network/tcp/client.h.
Referenced by tcp_client_create().
| atomic_bool tcp_client::should_reconnect |
Reconnection should be attempted
Definition at line 119 of file lib/network/tcp/client.h.
Referenced by tcp_client_cleanup(), tcp_client_connect(), and tcp_client_create().
| socket_t tcp_client::sockfd |
Socket file descriptor for server connection
Definition at line 110 of file lib/network/tcp/client.h.
Referenced by tcp_client_close(), tcp_client_connect(), tcp_client_create(), tcp_client_destroy(), tcp_client_get_socket(), tcp_client_send_audio_batch(), tcp_client_send_audio_opus(), tcp_client_send_audio_opus_batch(), tcp_client_send_join(), tcp_client_send_packet(), tcp_client_send_stream_start(), tcp_client_send_terminal_capabilities(), and tcp_client_shutdown().
| tty_info_t tcp_client::tty_info |
TTY information and capabilities
Definition at line 235 of file lib/network/tcp/client.h.
Referenced by tcp_client_create().