|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
💓 Ping/pong keepalive and timeout detection More...
Files | |
| file | keepalive.c |
| 💓 Client keepalive: periodic ping/pong exchange for reliable connection failure detection | |
| file | keepalive.h |
| ascii-chat Client Connection Keepalive Management Interface | |
Functions | |
| int | keepalive_start_thread () |
| Start keepalive/ping thread. | |
| void | keepalive_stop_thread () |
| Stop keepalive/ping thread. | |
| bool | keepalive_thread_exited () |
| Check if keepalive thread has exited. | |
💓 Ping/pong keepalive and timeout detection
The keepalive subsystem manages connection liveness by sending periodic ping packets and detecting pong timeouts to identify dead connections.
Implementation: src/client/keepalive.c, src/client/keepalive.h
Timing Parameters:
| int keepalive_start_thread | ( | ) |
#include <keepalive.c>
Start keepalive/ping thread.
Start keepalive/ping thread
Creates and starts the ping thread for connection keepalive. Must be called after successful server connection establishment.
Definition at line 233 of file keepalive.c.
References g_client_worker_pool, and thread_pool_spawn().
Referenced by protocol_start_connection().
| void keepalive_stop_thread | ( | ) |
#include <keepalive.c>
Stop keepalive/ping thread.
Stop keepalive/ping thread
Gracefully stops the ping thread and cleans up resources. Safe to call multiple times.
Definition at line 259 of file keepalive.c.
Referenced by protocol_stop_connection().
| bool keepalive_thread_exited | ( | ) |
#include <keepalive.c>
Check if keepalive thread has exited.
Check if keepalive thread has exited
Definition at line 291 of file keepalive.c.