ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
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 "../common.h"
15#include <libplatform/socket.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
35typedef bool (*parallel_connect_should_exit_fn)(void *user_data);
36
37typedef struct {
38 const char *hostname;
40 uint32_t timeout_ms; // Per-attempt timeout
41
42 // Optional: callback to check if connection should be abandoned (e.g.,
43 // shutdown signal) Called periodically from connection threads (~100ms
44 // intervals)
48
64 socket_t *out_socket);
65
66#endif // PARALLEL_CONNECT_H
67
68#ifdef __cplusplus
69}
70#endif
bool(* parallel_connect_should_exit_fn)(void *user_data)
unsigned short uint16_t
unsigned int uint32_t
asciichat_error_t
Error and exit codes - unified status values (0-255).
Definition error_codes.h:48
int socket_t
⚙️ Common definitions, error codes, macros, and types shared throughout the application
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