MiniQuake2

src/miniquake2/network/server.ml

Provides miniquake2 network server facilities for this project.

Package
miniquake2.network.server
Reachable
Yes

Imports

Declarations

acknowledgeFrame

function acknowledgeFrame(server, slot, frameNumber)

Return the acknowledge frame value.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.
slotdynamic—slot value consumed by this operation.
frameNumberdynamic—frameNumber value consumed by this operation.

View source

applyUserInfo

function applyUserInfo(client, userInfo)

Apply user info.

ParameterTypeDefaultDescription
clientdynamic—client value consumed by this operation.
userInfodynamic—userInfo value consumed by this operation.

View source

challengeFor

function challengeFor(server, address, now)

Return the challenge for the requested input.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.
addressdynamic—address value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source

challengeValid

function challengeValid(server, address, value)

Report whether challenge valid.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.
addressdynamic—address value consumed by this operation.
valuedynamic—Value consumed or transformed by the operation.

View source

checkTimeouts

function checkTimeouts(server, now)

Validate timeouts.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source

clientRate

function clientRate(userInfo)

SV_UserinfoChanged clamps the client-requested one-second snapshot budget. Missing or non-numeric values retain the stock 5000 byte default.

ParameterTypeDefaultDescription
userInfodynamic—userInfo value consumed by this operation.

View source

connectedCount

function connectedCount(server)

Report whether connected count.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.

View source

create

function create(maxClients, hostname, mapName, serverInfo, dedicated, publicServer)

Creates create for the miniquake2 network server module.

ParameterTypeDefaultDescription
maxClientsdynamic—maxClients value consumed by this operation.
hostnamedynamic—hostname value consumed by this operation.
mapNamedynamic—mapName value consumed by this operation.
serverInfodynamic—serverInfo value consumed by this operation.
dedicateddynamic—dedicated value consumed by this operation.
publicServerdynamic—publicServer value consumed by this operation.

View source

dropClient

function dropClient(server, slot, now, zombie)

Drop client.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.
slotdynamic—slot value consumed by this operation.
nowdynamic—now value consumed by this operation.
zombiedynamic—zombie value consumed by this operation.

View source

emptyClient

function emptyClient(slot)

Report whether empty client.

ParameterTypeDefaultDescription
slotdynamic—slot value consumed by this operation.

View source

handleConnect

function handleConnect(server, address, request, now)

Handle connect.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.
addressdynamic—address value consumed by this operation.
requestdynamic—request value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source

handleConnectionless

function handleConnectionless(server, address, datagram, now)

Handles connectionless for the miniquake2 network server workflow.

ParameterTypeDefaultDescription
serverdynamic—server 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

hasChallenge

function hasChallenge(server, address)

Report whether has challenge.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.
addressdynamic—address value consumed by this operation.

View source

heartbeatActions

function heartbeatActions(server, masters, now)

Return the heartbeat actions value.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.
mastersdynamic—masters value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source

infoString

function infoString(server, version)

Return the info string value.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.
versiondynamic—version value consumed by this operation.

View source

markSpawned

function markSpawned(server, slot)

Mark spawned.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.
slotdynamic—slot value consumed by this operation.

View source

masterPingActions

function masterPingActions(masters)

Return the master ping actions value.

ParameterTypeDefaultDescription
mastersdynamic—masters value consumed by this operation.

View source

nextChallenge

function nextChallenge(server)

Return the next challenge value.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.

View source

rateDrop

function rateDrop(server, slot, frameNumber)

sv_send.c: SV_RateDrop sums the previous ten 10 Hz datagram sizes. Remote clients over their advertised rate skip this frame and expose the number of skipped frames in the next svc_frame. Loopback is deliberately unlimited.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.
slotdynamic—slot value consumed by this operation.
frameNumberdynamic—frameNumber value consumed by this operation.

View source

receiveSequenced

function receiveSequenced(server, address, datagram, now)

Receive sequenced.

ParameterTypeDefaultDescription
serverdynamic—server 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

recordClientMessage

function recordClientMessage(server, slot, frameNumber, messageSize)

Record client message.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.
slotdynamic—slot value consumed by this operation.
frameNumberdynamic—frameNumber value consumed by this operation.
messageSizedynamic—messageSize value consumed by this operation.

View source

reply

function reply(kind, address, data, slot, text)

Return the reply value.

ParameterTypeDefaultDescription
kinddynamic—kind value consumed by this operation.
addressdynamic—address value consumed by this operation.
datadynamic—Input data consumed by the operation.
slotdynamic—slot value consumed by this operation.
textdynamic—Text consumed by the operation.

View source

sanitizedName

function sanitizedName(userInfo)

Return the sanitized name.

ParameterTypeDefaultDescription
userInfodynamic—userInfo value consumed by this operation.

View source

shutdownActions

function shutdownActions(server, masters)

Shut down actions.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.
mastersdynamic—masters value consumed by this operation.

View source

statusString

function statusString(server)

Return the status string value.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.

View source

writeClientFrame

function writeClientFrame(server, slot, current, baselines, buffer)

Write client frame.

ParameterTypeDefaultDescription
serverdynamic—server value consumed by this operation.
slotdynamic—slot value consumed by this operation.
currentdynamic—current value consumed by this operation.
baselinesdynamic—baselines value consumed by this operation.
bufferdynamic—Buffer that receives or supplies the operation data.

View source