Skip to content

Latest commit

 

History

History
133 lines (88 loc) · 1.95 KB

File metadata and controls

133 lines (88 loc) · 1.95 KB

System

Core library functions for initialization, versioning, async request management, and system-level operations.

Functions


GSCLIB_Init()

Initializes the gsclib library. Must be called once in main() before using any other gsclib functions.

main()
{
    GSCLIB_Init();
}

GSCLIB_Version()

Returns the gsclib version string.

version = GSCLIB_Version();

CoD4X_Version()

Returns the CoD4X version string.

version = CoD4X_Version();

CURL_Version()

Returns the libcurl version string.

version = CURL_Version();

System(<command>)

Executes a shell command on the host system.

Parameter Type Description
command string The shell command to execute
System("ls");

GetSysTime()

Returns the current system time in milliseconds.

time = GetSysTime();

Exit(<code>)

Exits the server process with the given exit code.

Parameter Type Description
code int Exit code
Exit(0);

AsyncStatus(<request>)

Returns the current status of an async request.

Parameter Type Description
request handle An async request handle

Return values:

Value Meaning
0 Uninitialized
1 Pending
2 Successful
3 Failure
status = AsyncStatus(request);

AsyncCancel(<request>)

Cancels a pending async request.

Parameter Type Description
request handle An async request handle
AsyncCancel(request);