Files
src/miniquake2/network/runtime/commands.ml
Provides miniquake2 network runtime commands facilities for this project.
- Package
miniquake2.network.runtime.commands- Reachable
- Yes
Imports
Declarations
# applyThink
function applyThink(runtime, slot, command)
Apply think.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
slot | dynamic | — | slot value consumed by this operation. |
command | dynamic | — | command value consumed by this operation. |
View source
# baselineFragment
function baselineFragment(baseline)
Return the baseline fragment value.
| Parameter | Type | Default | Description |
|---|
baseline | dynamic | — | baseline value consumed by this operation. |
View source
# beginDownload
function beginDownload(runtime, slot, name, offset)
Begin download.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
slot | dynamic | — | slot value consumed by this operation. |
name | dynamic | — | Name of the affected item. |
offset | dynamic | — | Zero-based offset at which processing starts. |
View source
# configStringFragment
function configStringFragment(index, value)
Return the config string fragment value.
| Parameter | Type | Default | Description |
|---|
index | dynamic | — | Zero-based index of the affected item. |
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# containsTraversal
function containsTraversal(name)
Report whether contains traversal.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | Name of the affected item. |
View source
# deferReliableWork
function deferReliableWork(runtime, slot, kind, first, second)
Return the defer reliable work value.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
slot | dynamic | — | slot value consumed by this operation. |
kind | dynamic | — | kind value consumed by this operation. |
first | dynamic | — | first value consumed by this operation. |
second | dynamic | — | second value consumed by this operation. |
View source
# DOWNLOAD_CHUNK
const DOWNLOAD_CHUNK = 1024
Defines the download chunk constant used by the miniquake2 network runtime commands module.
View source
# downloadFragment
function downloadFragment(data, offset, count, percent)
Return the download fragment value.
| Parameter | Type | Default | Description |
|---|
data | dynamic | — | Input data consumed by the operation. |
offset | dynamic | — | Zero-based offset at which processing starts. |
count | dynamic | — | Number of items or units to process. |
percent | dynamic | — | percent value consumed by this operation. |
View source
# executeOperator
function executeOperator(runtime, text)
A deliberately bounded operator surface. These are the stock commands needed to administer the Protocol-34 endpoint; it never delegates RCON text to the host shell or filesystem command parser.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
text | dynamic | — | Text consumed by the operation. |
View source
# executeString
function executeString(runtime, slot, text)
Execute string.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
slot | dynamic | — | slot value consumed by this operation. |
text | dynamic | — | Text consumed by the operation. |
View source
# findDownload
function findDownload(runtime, name)
Find download.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
name | dynamic | — | Name of the affected item. |
View source
# handleConnectionless
function handleConnectionless(runtime, address, datagram, now)
Handles connectionless for the miniquake2 network runtime commands workflow.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
address | dynamic | — | address value consumed by this operation. |
datagram | dynamic | — | datagram value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
View source
# handleRcon
function handleRcon(runtime, address, request)
Handle rcon.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
address | dynamic | — | address value consumed by this operation. |
request | dynamic | — | request value consumed by this operation. |
View source
# hasSubdirectory
function hasSubdirectory(name)
Report whether has subdirectory.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | Name of the affected item. |
View source
# integerArgument
function integerArgument(arguments, index)
Return the integer argument value.
| Parameter | Type | Default | Description |
|---|
arguments | dynamic | — | arguments value consumed by this operation. |
index | dynamic | — | Zero-based index of the affected item. |
View source
# joinedArguments
function joinedArguments(arguments, startIndex)
Return the joined arguments value.
| Parameter | Type | Default | Description |
|---|
arguments | dynamic | — | arguments value consumed by this operation. |
startIndex | dynamic | — | Zero-based index of start. |
View source
# MAX_DEFERRED_RELIABLE_WORK
const MAX_DEFERRED_RELIABLE_WORK = 16
Defines the max deferred reliable work constant used by the miniquake2 network runtime commands module.
View source
# MAX_NETWORK_COMMAND_LOG
const MAX_NETWORK_COMMAND_LOG = 1024
Defines the max network command log constant used by the miniquake2 network runtime commands module.
View source
# MAX_STRING_COMMANDS
const MAX_STRING_COMMANDS = 8
Defines the max string commands constant used by the miniquake2 network runtime commands module.
View source
# networkCommandAppendLog
function networkCommandAppendLog(runtime, slot, value)
Append network command log.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
slot | dynamic | — | slot value consumed by this operation. |
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# networkRuntimeZeroUserCmd
networkRuntimeZeroUserCmd
MSG_Write/ReadDeltaUsercmd never mutates its base command. Keep the stock
View source
# operatorClientSlot
function operatorClientSlot(runtime, selector)
Resolve an operator client selector by numeric slot or case-insensitive player name. Numeric slots use Quake II's human-facing zero-based values.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
selector | dynamic | — | selector value consumed by this operation. |
View source
# operatorDumpUser
function operatorDumpUser(runtime, slot)
Return the stock dumpuser-style information for one connected client.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
slot | dynamic | — | slot value consumed by this operation. |
View source
# operatorStatus
function operatorStatus(runtime)
Return the operator status value.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
View source
# parseClientPayload
function parseClientPayload(runtime, slot, payload, sequence, dropped, paused)
Parse client payload.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
slot | dynamic | — | slot value consumed by this operation. |
payload | dynamic | — | payload value consumed by this operation. |
sequence | dynamic | — | sequence value consumed by this operation. |
dropped | dynamic | — | dropped value consumed by this operation. |
paused | dynamic | — | paused value consumed by this operation. |
View source
# queueBaselines
function queueBaselines(runtime, slot, requestedSpawn, start)
Queue baselines.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
slot | dynamic | — | slot value consumed by this operation. |
requestedSpawn | dynamic | — | requestedSpawn value consumed by this operation. |
start | dynamic | — | start value consumed by this operation. |
View source
# queueConfigStrings
function queueConfigStrings(runtime, slot, requestedSpawn, start)
Queue config strings.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
slot | dynamic | — | slot value consumed by this operation. |
requestedSpawn | dynamic | — | requestedSpawn value consumed by this operation. |
start | dynamic | — | start value consumed by this operation. |
View source
# queueDownloadChunk
function queueDownloadChunk(runtime, slot)
Queue download chunk.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
slot | dynamic | — | slot value consumed by this operation. |
View source
# queueServerData
function queueServerData(runtime, slot)
Queue server data.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
slot | dynamic | — | slot value consumed by this operation. |
View source
# readClientStringCommand
function readClientStringCommand(buffer)
CL_Disconnect in the 3.19 client transmits strlen(final), deliberately omitting the strcpy terminator. Accept only that one exact terminal command; every other clc_stringcmd still requires regular NUL framing.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
View source
# registerDownload
function registerDownload(runtime, name, data)
Register download.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
name | dynamic | — | Name of the affected item. |
data | dynamic | — | Input data consumed by the operation. |
View source
# RELIABLE_WORK_BASELINES
const RELIABLE_WORK_BASELINES = 2
Defines the reliable work baselines constant used by the miniquake2 network runtime commands module.
View source
# RELIABLE_WORK_CONFIGSTRINGS
const RELIABLE_WORK_CONFIGSTRINGS = 1
Defines the reliable work configstrings constant used by the miniquake2 network runtime commands module.
View source
# RELIABLE_WORK_DOWNLOAD
const RELIABLE_WORK_DOWNLOAD = 3
Defines the reliable work download constant used by the miniquake2 network runtime commands module.
View source
# replenishCommandMsec
function replenishCommandMsec(runtime)
Return the replenish command msec value.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
View source
# retryDeferredReliable
function retryDeferredReliable(runtime, slot)
Client string commands are themselves reliably acknowledged before their server response necessarily fits. Retain a bounded typed retry record so backpressure cannot consume config/baseline/download requests.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
slot | dynamic | — | slot value consumed by this operation. |
View source
# safeDownloadName
function safeDownloadName(name)
Return the safe download name.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | Name of the affected item. |
View source
# serverDataFragments
function serverDataFragments(runtime, slot)
Return the server data fragments value.
| Parameter | Type | Default | Description |
|---|
runtime | dynamic | — | runtime value consumed by this operation. |
slot | dynamic | — | slot value consumed by this operation. |
View source
# stuffTextFragment
function stuffTextFragment(text)
Return the stuff text fragment value.
| Parameter | Type | Default | Description |
|---|
text | dynamic | — | Text consumed by the operation. |
View source
# writeMove
function writeMove(buffer, sequence, lastFrame, oldest, oldCommand, newCommand)
Write move.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
sequence | dynamic | — | sequence value consumed by this operation. |
lastFrame | dynamic | — | lastFrame value consumed by this operation. |
oldest | dynamic | — | oldest value consumed by this operation. |
oldCommand | dynamic | — | oldCommand value consumed by this operation. |
newCommand | dynamic | — | newCommand value consumed by this operation. |
View source
# writeStringCommand
function writeStringCommand(buffer, command)
Write string command.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
command | dynamic | — | command value consumed by this operation. |
View source
# writeUserInfo
function writeUserInfo(buffer, userInfo)
Write user info.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
userInfo | dynamic | — | userInfo value consumed by this operation. |
View source