ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
session_host Struct Reference

Internal session host structure. More...

Data Fields

int port
 Port to listen on.
 
char ipv4_address [64]
 IPv4 bind address.
 
char ipv6_address [64]
 IPv6 bind address.
 
int max_clients
 Maximum clients.
 
bool encryption_enabled
 Encryption enabled.
 
char key_path [512]
 Key path.
 
char password [256]
 Password.
 
session_host_callbacks_t callbacks
 Event callbacks.
 
void * user_data
 User data for callbacks.
 
socket_t socket_v4
 IPv4 listen socket.
 
socket_t socket_v6
 IPv6 listen socket.
 
bool running
 Server is running.
 
session_host_client_tclients
 Client array.
 
int client_count
 Current client count.
 
uint32_t next_client_id
 Next client ID counter.
 
mutex_t clients_mutex
 Client list mutex.
 
asciichat_thread_t accept_thread
 Accept thread handle.
 
bool accept_thread_running
 Accept thread is running.
 
asciichat_thread_t receive_thread
 Receive thread handle.
 
bool receive_thread_running
 Receive thread is running.
 
asciichat_thread_t render_thread
 Render thread handle (for video mixing and audio distribution)
 
bool render_thread_running
 Render thread is running.
 
session_audio_ctx_t * audio_ctx
 Audio context for mixing (host only)
 
opus_codec_t * opus_decoder
 Opus decoder for decoding incoming Opus audio.
 
opus_codec_t * opus_encoder
 Opus encoder for encoding mixed audio for broadcast.
 
bool initialized
 Context is initialized.
 

Detailed Description

Internal session host structure.

Contains server state, client list, and callback configuration.

Definition at line 82 of file host.c.

Field Documentation

◆ accept_thread

asciichat_thread_t session_host::accept_thread

Accept thread handle.

Definition at line 132 of file host.c.

Referenced by session_host_start(), and session_host_stop().

◆ accept_thread_running

bool session_host::accept_thread_running

Accept thread is running.

Definition at line 135 of file host.c.

Referenced by session_host_start(), and session_host_stop().

◆ audio_ctx

session_audio_ctx_t* session_host::audio_ctx

Audio context for mixing (host only)

Definition at line 150 of file host.c.

Referenced by session_host_destroy(), session_host_start_render(), and session_host_stop_render().

◆ callbacks

session_host_callbacks_t session_host::callbacks

◆ client_count

int session_host::client_count

◆ clients

◆ clients_mutex

◆ encryption_enabled

bool session_host::encryption_enabled

Encryption enabled.

Definition at line 96 of file host.c.

Referenced by session_host_create().

◆ initialized

◆ ipv4_address

char session_host::ipv4_address[64]

IPv4 bind address.

Definition at line 87 of file host.c.

Referenced by session_host_create(), and session_host_start().

◆ ipv6_address

char session_host::ipv6_address[64]

IPv6 bind address.

Definition at line 90 of file host.c.

Referenced by session_host_create().

◆ key_path

char session_host::key_path[512]

Key path.

Definition at line 99 of file host.c.

Referenced by session_host_create().

◆ max_clients

◆ next_client_id

uint32_t session_host::next_client_id

Next client ID counter.

Definition at line 126 of file host.c.

Referenced by session_host_add_client(), session_host_add_memory_participant(), and session_host_create().

◆ opus_decoder

opus_codec_t* session_host::opus_decoder

Opus decoder for decoding incoming Opus audio.

Definition at line 153 of file host.c.

Referenced by session_host_destroy(), session_host_start_render(), and session_host_stop_render().

◆ opus_encoder

opus_codec_t* session_host::opus_encoder

Opus encoder for encoding mixed audio for broadcast.

Definition at line 156 of file host.c.

Referenced by session_host_start_render(), and session_host_stop_render().

◆ password

char session_host::password[256]

Password.

Definition at line 102 of file host.c.

Referenced by session_host_create(), and session_host_destroy().

◆ port

int session_host::port

Port to listen on.

Definition at line 84 of file host.c.

Referenced by session_host_create(), and session_host_start().

◆ receive_thread

asciichat_thread_t session_host::receive_thread

Receive thread handle.

Definition at line 138 of file host.c.

Referenced by session_host_start(), and session_host_stop().

◆ receive_thread_running

bool session_host::receive_thread_running

Receive thread is running.

Definition at line 141 of file host.c.

Referenced by session_host_start(), and session_host_stop().

◆ render_thread

asciichat_thread_t session_host::render_thread

Render thread handle (for video mixing and audio distribution)

Definition at line 144 of file host.c.

Referenced by session_host_start_render(), session_host_stop(), and session_host_stop_render().

◆ render_thread_running

bool session_host::render_thread_running

Render thread is running.

Definition at line 147 of file host.c.

Referenced by session_host_start_render(), session_host_stop(), and session_host_stop_render().

◆ running

◆ socket_v4

socket_t session_host::socket_v4

IPv4 listen socket.

Definition at line 111 of file host.c.

Referenced by session_host_create(), session_host_destroy(), session_host_start(), and session_host_stop().

◆ socket_v6

socket_t session_host::socket_v6

IPv6 listen socket.

Definition at line 114 of file host.c.

Referenced by session_host_create(), session_host_destroy(), and session_host_stop().

◆ user_data

void* session_host::user_data

The documentation for this struct was generated from the following file: