MiniQuake2

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.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
slotdynamic—slot value consumed by this operation.
commanddynamic—command value consumed by this operation.

View source

baselineFragment

function baselineFragment(baseline)

Return the baseline fragment value.

ParameterTypeDefaultDescription
baselinedynamic—baseline value consumed by this operation.

View source

beginDownload

function beginDownload(runtime, slot, name, offset)

Begin download.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
slotdynamic—slot value consumed by this operation.
namedynamic—Name of the affected item.
offsetdynamic—Zero-based offset at which processing starts.

View source

configStringFragment

function configStringFragment(index, value)

Return the config string fragment value.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the affected item.
valuedynamic—Value consumed or transformed by the operation.

View source

containsTraversal

function containsTraversal(name)

Report whether contains traversal.

ParameterTypeDefaultDescription
namedynamic—Name of the affected item.

View source

deferReliableWork

function deferReliableWork(runtime, slot, kind, first, second)

Return the defer reliable work value.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
slotdynamic—slot value consumed by this operation.
kinddynamic—kind value consumed by this operation.
firstdynamic—first value consumed by this operation.
seconddynamic—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.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset at which processing starts.
countdynamic—Number of items or units to process.
percentdynamic—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.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
textdynamic—Text consumed by the operation.

View source

executeString

function executeString(runtime, slot, text)

Execute string.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
slotdynamic—slot value consumed by this operation.
textdynamic—Text consumed by the operation.

View source

findDownload

function findDownload(runtime, name)

Find download.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
namedynamic—Name of the affected item.

View source

handleConnectionless

function handleConnectionless(runtime, address, datagram, now)

Handles connectionless for the miniquake2 network runtime commands workflow.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
addressdynamic—address value consumed by this operation.
datagramdynamic—datagram value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source

handleRcon

function handleRcon(runtime, address, request)

Handle rcon.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
addressdynamic—address value consumed by this operation.
requestdynamic—request value consumed by this operation.

View source

hasSubdirectory

function hasSubdirectory(name)

Report whether has subdirectory.

ParameterTypeDefaultDescription
namedynamic—Name of the affected item.

View source

integerArgument

function integerArgument(arguments, index)

Return the integer argument value.

ParameterTypeDefaultDescription
argumentsdynamic—arguments value consumed by this operation.
indexdynamic—Zero-based index of the affected item.

View source

joinedArguments

function joinedArguments(arguments, startIndex)

Return the joined arguments value.

ParameterTypeDefaultDescription
argumentsdynamic—arguments value consumed by this operation.
startIndexdynamic—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.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
slotdynamic—slot value consumed by this operation.
valuedynamic—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.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
selectordynamic—selector value consumed by this operation.

View source

operatorDumpUser

function operatorDumpUser(runtime, slot)

Return the stock dumpuser-style information for one connected client.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
slotdynamic—slot value consumed by this operation.

View source

operatorStatus

function operatorStatus(runtime)

Return the operator status value.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.

View source

parseClientPayload

function parseClientPayload(runtime, slot, payload, sequence, dropped, paused)

Parse client payload.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
slotdynamic—slot value consumed by this operation.
payloaddynamic—payload value consumed by this operation.
sequencedynamic—sequence value consumed by this operation.
droppeddynamic—dropped value consumed by this operation.
pauseddynamic—paused value consumed by this operation.

View source

queueBaselines

function queueBaselines(runtime, slot, requestedSpawn, start)

Queue baselines.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
slotdynamic—slot value consumed by this operation.
requestedSpawndynamic—requestedSpawn value consumed by this operation.
startdynamic—start value consumed by this operation.

View source

queueConfigStrings

function queueConfigStrings(runtime, slot, requestedSpawn, start)

Queue config strings.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
slotdynamic—slot value consumed by this operation.
requestedSpawndynamic—requestedSpawn value consumed by this operation.
startdynamic—start value consumed by this operation.

View source

queueDownloadChunk

function queueDownloadChunk(runtime, slot)

Queue download chunk.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
slotdynamic—slot value consumed by this operation.

View source

queueServerData

function queueServerData(runtime, slot)

Queue server data.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
slotdynamic—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.

ParameterTypeDefaultDescription
bufferdynamic—Buffer that receives or supplies the operation data.

View source

registerDownload

function registerDownload(runtime, name, data)

Register download.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
namedynamic—Name of the affected item.
datadynamic—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.

ParameterTypeDefaultDescription
runtimedynamic—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.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
slotdynamic—slot value consumed by this operation.

View source

safeDownloadName

function safeDownloadName(name)

Return the safe download name.

ParameterTypeDefaultDescription
namedynamic—Name of the affected item.

View source

serverDataFragments

function serverDataFragments(runtime, slot)

Return the server data fragments value.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
slotdynamic—slot value consumed by this operation.

View source

stuffTextFragment

function stuffTextFragment(text)

Return the stuff text fragment value.

ParameterTypeDefaultDescription
textdynamic—Text consumed by the operation.

View source

writeMove

function writeMove(buffer, sequence, lastFrame, oldest, oldCommand, newCommand)

Write move.

ParameterTypeDefaultDescription
bufferdynamic—Buffer that receives or supplies the operation data.
sequencedynamic—sequence value consumed by this operation.
lastFramedynamic—lastFrame value consumed by this operation.
oldestdynamic—oldest value consumed by this operation.
oldCommanddynamic—oldCommand value consumed by this operation.
newCommanddynamic—newCommand value consumed by this operation.

View source

writeStringCommand

function writeStringCommand(buffer, command)

Write string command.

ParameterTypeDefaultDescription
bufferdynamic—Buffer that receives or supplies the operation data.
commanddynamic—command value consumed by this operation.

View source

writeUserInfo

function writeUserInfo(buffer, userInfo)

Write user info.

ParameterTypeDefaultDescription
bufferdynamic—Buffer that receives or supplies the operation data.
userInfodynamic—userInfo value consumed by this operation.

View source