Core library functions for initialization, versioning, async request management, and system-level operations.
- GSCLIB_Init
- GSCLIB_Version
- CoD4X_Version
- CURL_Version
- System
- GetSysTime
- Exit
- AsyncStatus
- AsyncCancel
Initializes the gsclib library. Must be called once in main() before using any other gsclib functions.
main()
{
GSCLIB_Init();
}Returns the gsclib version string.
version = GSCLIB_Version();Returns the CoD4X version string.
version = CoD4X_Version();Returns the libcurl version string.
version = CURL_Version();Executes a shell command on the host system.
| Parameter | Type | Description |
|---|---|---|
command |
string | The shell command to execute |
System("ls");Returns the current system time in milliseconds.
time = GetSysTime();Exits the server process with the given exit code.
| Parameter | Type | Description |
|---|---|---|
code |
int | Exit code |
Exit(0);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);Cancels a pending async request.
| Parameter | Type | Description |
|---|---|---|
request |
handle | An async request handle |
AsyncCancel(request);