ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
parallel_connect.h
Go to the documentation of this file.
1
10
11#ifndef PARALLEL_CONNECT_H
12#define PARALLEL_CONNECT_H
13
14#include "../os/socket.h"
15#include "../common.h"
16
27typedef bool (*parallel_connect_should_exit_fn)(void *user_data);
28
29typedef struct {
30 const char *hostname;
32 uint32_t timeout_ms; // Per-attempt timeout
33
34 // Optional: callback to check if connection should be abandoned (e.g., shutdown signal)
35 // Called periodically from connection threads (~100ms intervals)
39
55
56#endif // PARALLEL_CONNECT_H
bool(* parallel_connect_should_exit_fn)(void *user_data)
⚙️ Common definitions, error codes, macros, and types shared throughout the application
unsigned short uint16_t
Definition common.h:61
unsigned int uint32_t
Definition common.h:62
asciichat_error_t
Error and exit codes - unified status values (0-255).
Definition error_codes.h:44
int socket_t
asciichat_error_t parallel_connect(const parallel_connect_config_t *config, socket_t *out_socket)
bool(* parallel_connect_should_exit_fn)(void *user_data)
When code needs to work with parallel connect config, it keeps hostname, port, timeout_ms,...
parallel_connect_should_exit_fn should_exit_callback