Files
src/miniquake2/network/server.ml
Provides miniquake2 network server facilities for this project.
- Package
miniquake2.network.server- Reachable
- Yes
Imports
Declarations
# applyUserInfo
function applyUserInfo(client, userInfo)
Apply user info.
| Parameter | Type | Default | Description |
|---|
client | dynamic | — | client value consumed by this operation. |
userInfo | dynamic | — | userInfo value consumed by this operation. |
View source
# challengeFor
function challengeFor(server, address, now)
Return the challenge for the requested input.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
address | dynamic | — | address value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
View source
# challengeValid
function challengeValid(server, address, value)
Report whether challenge valid.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
address | dynamic | — | address value consumed by this operation. |
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# checkTimeouts
function checkTimeouts(server, now)
Validate timeouts.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
now | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
userInfo | dynamic | — | userInfo value consumed by this operation. |
View source
# connectedCount
function connectedCount(server)
Report whether connected count.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
maxClients | dynamic | — | maxClients value consumed by this operation. |
hostname | dynamic | — | hostname value consumed by this operation. |
mapName | dynamic | — | mapName value consumed by this operation. |
serverInfo | dynamic | — | serverInfo value consumed by this operation. |
dedicated | dynamic | — | dedicated value consumed by this operation. |
publicServer | dynamic | — | publicServer value consumed by this operation. |
View source
# dropClient
function dropClient(server, slot, now, zombie)
Drop client.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
slot | dynamic | — | slot value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
zombie | dynamic | — | zombie value consumed by this operation. |
View source
# emptyClient
function emptyClient(slot)
Report whether empty client.
| Parameter | Type | Default | Description |
|---|
slot | dynamic | — | slot value consumed by this operation. |
View source
# handleConnect
function handleConnect(server, address, request, now)
Handle connect.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
address | dynamic | — | address value consumed by this operation. |
request | dynamic | — | request value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
View source
# handleConnectionless
function handleConnectionless(server, address, datagram, now)
Handles connectionless for the miniquake2 network server workflow.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server 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
# hasChallenge
function hasChallenge(server, address)
Report whether has challenge.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
address | dynamic | — | address value consumed by this operation. |
View source
# heartbeatActions
function heartbeatActions(server, masters, now)
Return the heartbeat actions value.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
masters | dynamic | — | masters value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
View source
# infoString
function infoString(server, version)
Return the info string value.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
version | dynamic | — | version value consumed by this operation. |
View source
# markSpawned
function markSpawned(server, slot)
Mark spawned.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
slot | dynamic | — | slot value consumed by this operation. |
View source
# masterPingActions
function masterPingActions(masters)
Return the master ping actions value.
| Parameter | Type | Default | Description |
|---|
masters | dynamic | — | masters value consumed by this operation. |
View source
# nextChallenge
function nextChallenge(server)
Return the next challenge value.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
View source
# receiveSequenced
function receiveSequenced(server, address, datagram, now)
Receive sequenced.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server 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
# reply
function reply(kind, address, data, slot, text)
Return the reply value.
| Parameter | Type | Default | Description |
|---|
kind | dynamic | — | kind value consumed by this operation. |
address | dynamic | — | address value consumed by this operation. |
data | dynamic | — | Input data consumed by the operation. |
slot | dynamic | — | slot value consumed by this operation. |
text | dynamic | — | Text consumed by the operation. |
View source
# sanitizedName
function sanitizedName(userInfo)
Return the sanitized name.
| Parameter | Type | Default | Description |
|---|
userInfo | dynamic | — | userInfo value consumed by this operation. |
View source
# shutdownActions
function shutdownActions(server, masters)
Shut down actions.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
masters | dynamic | — | masters value consumed by this operation. |
View source
# statusString
function statusString(server)
Return the status string value.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
View source
# writeClientFrame
function writeClientFrame(server, slot, current, baselines, buffer)
Write client frame.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
slot | dynamic | — | slot value consumed by this operation. |
current | dynamic | — | current value consumed by this operation. |
baselines | dynamic | — | baselines value consumed by this operation. |
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
View source