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

Per-thread connection attempt state for parallel IPv4/IPv6 racing. More...

Data Fields

socket_t socket
 Socket for this attempt.
 
struct sockaddr_storage addr
 Socket address to connect to.
 
socklen_t addr_len
 Length of address structure.
 
int family
 Address family (AF_INET or AF_INET6)
 
const char * family_name
 Human-readable family name ("IPv4"/"IPv6")
 
uint32_t timeout_ms
 Connection timeout in milliseconds.
 
volatile bool connected
 True if this attempt succeeded.
 
volatile bool done
 True if this attempt finished.
 
volatile socket_twinner_socket
 Shared pointer to winning socket.
 
volatile boolwinner_found
 Shared flag indicating a winner exists.
 
mutex_t * lock
 Shared mutex for coordination.
 
cond_t * signal
 Shared condition variable for signaling.
 
parallel_connect_should_exit_fn should_exit_callback
 Optional exit callback for graceful shutdown.
 
void * callback_data
 User data for callback.
 

Detailed Description

Per-thread connection attempt state for parallel IPv4/IPv6 racing.

Definition at line 27 of file parallel_connect.c.

Field Documentation

◆ addr

struct sockaddr_storage connection_attempt_t::addr

Socket address to connect to.

Definition at line 29 of file parallel_connect.c.

Referenced by parallel_connect().

◆ addr_len

socklen_t connection_attempt_t::addr_len

Length of address structure.

Definition at line 30 of file parallel_connect.c.

Referenced by parallel_connect().

◆ callback_data

void* connection_attempt_t::callback_data

User data for callback.

Definition at line 41 of file parallel_connect.c.

Referenced by parallel_connect().

◆ connected

volatile bool connection_attempt_t::connected

True if this attempt succeeded.

Definition at line 34 of file parallel_connect.c.

◆ done

volatile bool connection_attempt_t::done

True if this attempt finished.

Definition at line 35 of file parallel_connect.c.

Referenced by parallel_connect().

◆ family

int connection_attempt_t::family

Address family (AF_INET or AF_INET6)

Definition at line 31 of file parallel_connect.c.

Referenced by parallel_connect().

◆ family_name

const char* connection_attempt_t::family_name

Human-readable family name ("IPv4"/"IPv6")

Definition at line 32 of file parallel_connect.c.

Referenced by parallel_connect().

◆ lock

mutex_t* connection_attempt_t::lock

Shared mutex for coordination.

Definition at line 38 of file parallel_connect.c.

Referenced by parallel_connect().

◆ should_exit_callback

parallel_connect_should_exit_fn connection_attempt_t::should_exit_callback

Optional exit callback for graceful shutdown.

Definition at line 40 of file parallel_connect.c.

Referenced by parallel_connect().

◆ signal

cond_t* connection_attempt_t::signal

Shared condition variable for signaling.

Definition at line 39 of file parallel_connect.c.

Referenced by parallel_connect().

◆ socket

socket_t connection_attempt_t::socket

Socket for this attempt.

Definition at line 28 of file parallel_connect.c.

Referenced by parallel_connect().

◆ timeout_ms

uint32_t connection_attempt_t::timeout_ms

Connection timeout in milliseconds.

Definition at line 33 of file parallel_connect.c.

Referenced by parallel_connect().

◆ winner_found

volatile bool* connection_attempt_t::winner_found

Shared flag indicating a winner exists.

Definition at line 37 of file parallel_connect.c.

Referenced by parallel_connect().

◆ winner_socket

volatile socket_t* connection_attempt_t::winner_socket

Shared pointer to winning socket.

Definition at line 36 of file parallel_connect.c.

Referenced by parallel_connect().


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