ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
query.c File Reference

Query tool runtime library implementation. More...

Go to the source code of this file.

Macros

#define HEALTH_CHECK_TIMEOUT_MS   10000
 
#define HEALTH_CHECK_INTERVAL_MS   100
 
#define HEALTH_CHECK_CONNECT_TIMEOUT_MS   500
 

Functions

int query_init (int preferred_port)
 Initialize the query tool by spawning the controller process.
 
void query_shutdown (void)
 Shutdown the query tool and terminate the controller process.
 
bool query_is_active (void)
 Check if the query tool controller is currently active.
 
int query_get_port (void)
 Get the port number of the active query server.
 

Detailed Description

Query tool runtime library implementation.

This provides the QUERY_INIT/QUERY_SHUTDOWN macros that applications use to auto-spawn the query controller process.

Platform support:

  • Unix (macOS/Linux): Uses fork/exec to spawn controller
  • Windows: Uses CreateProcess to spawn controller

Definition in file query.c.

Macro Definition Documentation

◆ HEALTH_CHECK_CONNECT_TIMEOUT_MS

#define HEALTH_CHECK_CONNECT_TIMEOUT_MS   500

Definition at line 40 of file query.c.

◆ HEALTH_CHECK_INTERVAL_MS

#define HEALTH_CHECK_INTERVAL_MS   100

Definition at line 39 of file query.c.

◆ HEALTH_CHECK_TIMEOUT_MS

#define HEALTH_CHECK_TIMEOUT_MS   10000

Definition at line 38 of file query.c.