ascii-chat 0.11.33
Video chat in your terminal
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_NS   (10000LL * NS_PER_MS_INT)
 
#define HEALTH_CHECK_INTERVAL_NS   (100LL * NS_PER_MS_INT)
 
#define HEALTH_CHECK_CONNECT_TIMEOUT_NS   (500LL * NS_PER_MS_INT)
 

Functions

int query_init (int preferred_port)
 Initialize the query tool by spawning the controller process.
 
void query_destroy (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_NS

#define HEALTH_CHECK_CONNECT_TIMEOUT_NS   (500LL * NS_PER_MS_INT)

Definition at line 42 of file query.c.

◆ HEALTH_CHECK_INTERVAL_NS

#define HEALTH_CHECK_INTERVAL_NS   (100LL * NS_PER_MS_INT)

Definition at line 41 of file query.c.

◆ HEALTH_CHECK_TIMEOUT_NS

#define HEALTH_CHECK_TIMEOUT_NS   (10000LL * NS_PER_MS_INT)

Definition at line 40 of file query.c.