|
ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
|
Per-client state structure for server-side client management. More...
#include <lib/network/client.h>
Per-client state structure for server-side client management.
Represents complete state for a single connected client in the ascii-chat server. This structure stores all client-specific information including network connection, media capabilities, terminal settings, threading state, and synchronization primitives.
Each client has dedicated threads:
Definition at line 77 of file lib/network/client.h.
| atomic_bool client_info::active |
Definition at line 111 of file lib/network/client.h.
Referenced by any_clients_sending_video(), broadcast_server_state_to_all_clients(), client_audio_render_thread(), client_receive_thread(), client_send_thread_func(), client_video_render_thread(), disconnect_client_for_bad_data(), find_client_by_socket(), handle_client_leave_packet(), send_server_state_to_client(), stats_logger_thread(), stop_client_threads(), and update_server_stats().
| packet_queue_t* client_info::audio_queue |
Definition at line 127 of file lib/network/client.h.
Referenced by cleanup_client_packet_queues(), client_audio_render_thread(), client_send_thread_func(), disconnect_client_for_bad_data(), queue_audio_for_client(), and stats_logger_thread().
| asciichat_thread_t client_info::audio_render_thread |
Definition at line 147 of file lib/network/client.h.
Referenced by stop_client_render_threads().
| atomic_bool client_info::audio_render_thread_running |
Definition at line 149 of file lib/network/client.h.
Referenced by client_audio_render_thread(), client_receive_thread(), create_client_render_threads(), disconnect_client_for_bad_data(), and stop_client_render_threads().
| bool client_info::can_send_audio |
Definition at line 88 of file lib/network/client.h.
Referenced by handle_client_join_packet().
| bool client_info::can_send_video |
Definition at line 87 of file lib/network/client.h.
Referenced by handle_client_join_packet().
| atomic_uint client_info::client_id |
Definition at line 81 of file lib/network/client.h.
Referenced by any_clients_sending_video(), broadcast_server_state_to_all_clients(), client_audio_render_thread(), client_receive_thread(), client_send_thread_func(), client_video_render_thread(), create_client_render_threads(), disconnect_client_for_bad_data(), handle_audio_batch_packet(), handle_audio_opus_batch_packet(), handle_audio_opus_packet(), handle_client_capabilities_packet(), handle_client_join_packet(), handle_client_leave_packet(), handle_image_frame_packet(), handle_protocol_version_packet(), handle_remote_log_packet_from_client(), handle_size_packet(), handle_stream_start_packet(), handle_stream_stop_packet(), process_decrypted_packet(), process_encrypted_packet(), send_server_state_to_client(), server_crypto_handshake(), server_main(), stats_logger_thread(), stop_client_render_threads(), and update_server_stats().
| char client_info::client_ip[INET_ADDRSTRLEN] |
Definition at line 83 of file lib/network/client.h.
Referenced by process_decrypted_packet().
| char client_info::client_luminance_palette[256] |
Definition at line 103 of file lib/network/client.h.
Referenced by handle_client_capabilities_packet().
| char client_info::client_palette_chars[256] |
Definition at line 101 of file lib/network/client.h.
Referenced by handle_client_capabilities_packet().
| bool client_info::client_palette_initialized |
Definition at line 105 of file lib/network/client.h.
Referenced by handle_client_capabilities_packet().
| size_t client_info::client_palette_len |
Definition at line 102 of file lib/network/client.h.
Referenced by handle_client_capabilities_packet().
| palette_type_t client_info::client_palette_type |
Definition at line 104 of file lib/network/client.h.
Referenced by handle_client_capabilities_packet().
| mutex_t client_info::client_state_mutex |
Definition at line 156 of file lib/network/client.h.
Referenced by client_audio_render_thread(), client_send_thread_func(), disconnect_client_for_bad_data(), handle_client_capabilities_packet(), handle_image_frame_packet(), handle_size_packet(), and server_crypto_handshake().
| time_t client_info::connected_at |
Definition at line 114 of file lib/network/client.h.
| void* client_info::crypto_ciphertext_buffer |
Definition at line 142 of file lib/network/client.h.
| size_t client_info::crypto_ciphertext_size |
Definition at line 143 of file lib/network/client.h.
| crypto_handshake_context_t client_info::crypto_handshake_ctx |
Definition at line 160 of file lib/network/client.h.
Referenced by broadcast_server_state_to_all_clients(), client_send_thread_func(), crypto_server_cleanup_client(), crypto_server_decrypt_packet(), crypto_server_encrypt_packet(), crypto_server_get_context(), crypto_server_is_ready(), disconnect_client_for_bad_data(), and server_crypto_handshake().
| bool client_info::crypto_initialized |
Definition at line 161 of file lib/network/client.h.
Referenced by client_send_thread_func(), crypto_server_cleanup_client(), crypto_server_is_ready(), disconnect_client_for_bad_data(), and server_crypto_handshake().
| void* client_info::crypto_plaintext_buffer |
Definition at line 140 of file lib/network/client.h.
| size_t client_info::crypto_plaintext_size |
Definition at line 141 of file lib/network/client.h.
| char client_info::display_name[MAX_DISPLAY_NAME_LEN] |
Definition at line 82 of file lib/network/client.h.
Referenced by client_audio_render_thread(), client_receive_thread(), client_send_thread_func(), handle_client_join_packet(), and handle_remote_log_packet_from_client().
| uint64_t client_info::frames_received |
Definition at line 116 of file lib/network/client.h.
Referenced by handle_image_frame_packet().
| uint32_t client_info::frames_received_logged |
Definition at line 117 of file lib/network/client.h.
Referenced by handle_image_frame_packet().
| uint64_t client_info::frames_sent |
Definition at line 115 of file lib/network/client.h.
Referenced by update_server_stats().
| bool client_info::has_terminal_caps |
Definition at line 98 of file lib/network/client.h.
Referenced by client_video_render_thread(), and handle_client_capabilities_packet().
| atomic_ushort client_info::height |
Definition at line 108 of file lib/network/client.h.
Referenced by client_send_thread_func(), client_video_render_thread(), handle_client_capabilities_packet(), and handle_size_packet().
| UT_hash_handle client_info::hh |
Definition at line 171 of file lib/network/client.h.
| audio_ring_buffer_t* client_info::incoming_audio_buffer |
Definition at line 121 of file lib/network/client.h.
Referenced by cleanup_client_media_buffers(), handle_audio_batch_packet(), handle_audio_opus_batch_packet(), handle_audio_opus_packet(), and handle_audio_packet().
| video_frame_buffer_t* client_info::incoming_video_buffer |
Definition at line 120 of file lib/network/client.h.
Referenced by cleanup_client_media_buffers(), and handle_image_frame_packet().
| atomic_bool client_info::is_sending_audio |
Definition at line 91 of file lib/network/client.h.
Referenced by handle_audio_batch_packet(), handle_audio_opus_packet(), handle_stream_start_packet(), and handle_stream_stop_packet().
| atomic_bool client_info::is_sending_video |
Definition at line 90 of file lib/network/client.h.
Referenced by any_clients_sending_video(), broadcast_server_state_to_all_clients(), handle_image_frame_packet(), and handle_stream_stop_packet().
| struct timespec client_info::last_audio_render_time |
Definition at line 153 of file lib/network/client.h.
| atomic_int client_info::last_rendered_grid_sources |
Definition at line 134 of file lib/network/client.h.
Referenced by client_send_thread_func(), and client_video_render_thread().
| atomic_int client_info::last_sent_grid_sources |
Definition at line 135 of file lib/network/client.h.
Referenced by client_send_thread_func().
| struct timespec client_info::last_video_render_time |
Definition at line 152 of file lib/network/client.h.
| void* client_info::opus_decoder |
Definition at line 94 of file lib/network/client.h.
Referenced by cleanup_client_media_buffers(), handle_audio_opus_batch_packet(), handle_audio_opus_packet(), and handle_stream_start_packet().
| video_frame_buffer_t* client_info::outgoing_video_buffer |
Definition at line 124 of file lib/network/client.h.
Referenced by cleanup_client_media_buffers(), client_send_thread_func(), client_video_render_thread(), stats_logger_thread(), and update_server_stats().
| size_t client_info::pending_packet_length |
Definition at line 168 of file lib/network/client.h.
Referenced by server_crypto_handshake().
| void* client_info::pending_packet_payload |
Definition at line 167 of file lib/network/client.h.
Referenced by server_crypto_handshake().
| packet_type_t client_info::pending_packet_type |
Definition at line 166 of file lib/network/client.h.
Referenced by server_crypto_handshake().
| int client_info::port |
Definition at line 84 of file lib/network/client.h.
| atomic_bool client_info::protocol_disconnect_requested |
Definition at line 113 of file lib/network/client.h.
Referenced by client_receive_thread(), and disconnect_client_for_bad_data().
| asciichat_thread_t client_info::receive_thread |
Definition at line 80 of file lib/network/client.h.
Referenced by stop_client_threads().
| void* client_info::send_buffer |
Definition at line 138 of file lib/network/client.h.
Referenced by cleanup_client_media_buffers().
| size_t client_info::send_buffer_size |
Definition at line 139 of file lib/network/client.h.
Referenced by cleanup_client_media_buffers().
| mutex_t client_info::send_mutex |
Definition at line 157 of file lib/network/client.h.
Referenced by broadcast_server_state_to_all_clients(), client_send_thread_func(), disconnect_client_for_bad_data(), process_decrypted_packet(), and send_server_state_to_client().
| asciichat_thread_t client_info::send_thread |
Definition at line 130 of file lib/network/client.h.
Referenced by stop_client_threads().
| atomic_bool client_info::send_thread_running |
Definition at line 131 of file lib/network/client.h.
Referenced by client_receive_thread(), client_send_thread_func(), disconnect_client_for_bad_data(), and stop_client_threads().
| atomic_bool client_info::shutting_down |
Definition at line 112 of file lib/network/client.h.
Referenced by client_audio_render_thread(), client_send_thread_func(), client_video_render_thread(), and disconnect_client_for_bad_data().
| socket_t client_info::socket |
Definition at line 78 of file lib/network/client.h.
Referenced by broadcast_server_state_to_all_clients(), client_audio_render_thread(), client_receive_thread(), client_send_thread_func(), client_video_render_thread(), create_client_render_threads(), disconnect_client_for_bad_data(), find_client_by_socket(), process_decrypted_packet(), server_crypto_handshake(), and server_main().
| terminal_capabilities_t client_info::terminal_caps |
Definition at line 97 of file lib/network/client.h.
Referenced by client_video_render_thread(), and handle_client_capabilities_packet().
| acip_transport_t* client_info::transport |
Definition at line 79 of file lib/network/client.h.
Referenced by broadcast_server_state_to_all_clients(), client_receive_thread(), client_send_thread_func(), process_decrypted_packet(), and send_server_state_to_client().
| asciichat_thread_t client_info::video_render_thread |
Definition at line 146 of file lib/network/client.h.
Referenced by stop_client_render_threads().
| atomic_bool client_info::video_render_thread_running |
Definition at line 148 of file lib/network/client.h.
Referenced by client_receive_thread(), client_video_render_thread(), create_client_render_threads(), disconnect_client_for_bad_data(), and stop_client_render_threads().
| bool client_info::wants_stretch |
Definition at line 89 of file lib/network/client.h.
Referenced by handle_client_join_packet().
| atomic_ushort client_info::width |
Definition at line 108 of file lib/network/client.h.
Referenced by client_send_thread_func(), client_video_render_thread(), handle_client_capabilities_packet(), and handle_size_packet().