MiniQuake

src/miniquake/net_control.ml

Package
miniquake.net_control
Reachable
Yes

Imports

Declarations

CCREP_ACCEPT

const CCREP_ACCEPT = 129

Defines the ccrep accept value used by `miniquake.net_control`.

View source

CCREP_PLAYER_INFO

const CCREP_PLAYER_INFO = 132

Defines the ccrep player info value used by `miniquake.net_control`.

View source

CCREP_REJECT

const CCREP_REJECT = 130

Defines the ccrep reject value used by `miniquake.net_control`.

View source

CCREP_RULE_INFO

const CCREP_RULE_INFO = 133

Defines the ccrep rule info value used by `miniquake.net_control`.

View source

CCREP_SERVER_INFO

const CCREP_SERVER_INFO = 131

Defines the ccrep server info value used by `miniquake.net_control`.

View source

CCREQ_CONNECT

const CCREQ_CONNECT = 1

Defines the ccreq connect value used by `miniquake.net_control`.

View source

CCREQ_PLAYER_INFO

const CCREQ_PLAYER_INFO = 3

Defines the ccreq player info value used by `miniquake.net_control`.

View source

CCREQ_RULE_INFO

const CCREQ_RULE_INFO = 4

Defines the ccreq rule info value used by `miniquake.net_control`.

View source

CCREQ_SERVER_INFO

const CCREQ_SERVER_INFO = 2

Defines the ccreq server info value used by `miniquake.net_control`.

View source

GAME_NAME

const GAME_NAME = "QUAKE"

Defines the game name value used by `miniquake.net_control`.

View source

NET_PROTOCOL_VERSION

const NET_PROTOCOL_VERSION = 3

Defines the net protocol version value used by `miniquake.net_control`.

View source

parse

function parse(wirePacket)

Returns [command, fields]. The field order is the exact net.h wire order.

ParameterTypeDefaultDescription
wirePacketdynamic—The wire packet input consumed by `parse`.

View source

replyAccept

function replyAccept(port)

Implements the `replyAccept` operation for `miniquake.net_control` (reply accept).

ParameterTypeDefaultDescription
portdynamic—The port input consumed by `replyAccept`.

View source

replyPlayerInfo

function replyPlayerInfo(playerNumber, name, colors, frags, connectTime, address)

Implements the `replyPlayerInfo` operation for `miniquake.net_control` (reply player info).

ParameterTypeDefaultDescription
playerNumberdynamic—The player number input consumed by `replyPlayerInfo`.
namedynamic—Stable name that identifies the requested object or option.
colorsdynamic—The colors input consumed by `replyPlayerInfo`.
fragsdynamic—The frags input consumed by `replyPlayerInfo`.
connectTimedynamic—Time value used by the operation.
addressdynamic—Network address of the peer.

View source

replyReject

function replyReject(reason)

Implements the `replyReject` operation for `miniquake.net_control` (reply reject).

ParameterTypeDefaultDescription
reasondynamic—The reason input consumed by `replyReject`.

View source

replyRuleInfo

function replyRuleInfo(rule, value)

Implements the `replyRuleInfo` operation for `miniquake.net_control` (reply rule info).

ParameterTypeDefaultDescription
ruledynamic—The rule input consumed by `replyRuleInfo`.
valuedynamic—Value consumed by `replyRuleInfo`.

View source

replyServerInfo

function replyServerInfo(address, hostName, levelName, currentPlayers, maxPlayers)

Implements the `replyServerInfo` operation for `miniquake.net_control` (reply server info).

ParameterTypeDefaultDescription
addressdynamic—Network address of the peer.
hostNamedynamic—Name that identifies the requested value or resource.
levelNamedynamic—Name that identifies the requested value or resource.
currentPlayersdynamic—The current players input consumed by `replyServerInfo`.
maxPlayersdynamic—The max players input consumed by `replyServerInfo`.

View source

requestConnect

function requestConnect()

Implements the `requestConnect` operation for `miniquake.net_control` (request connect).

View source

requestPlayerInfo

function requestPlayerInfo(playerNumber)

Implements the `requestPlayerInfo` operation for `miniquake.net_control` (request player info).

ParameterTypeDefaultDescription
playerNumberdynamic—The player number input consumed by `requestPlayerInfo`.

View source

requestRuleInfo

function requestRuleInfo(previousRule)

Implements the `requestRuleInfo` operation for `miniquake.net_control` (request rule info).

ParameterTypeDefaultDescription
previousRuledynamic—The previous rule input consumed by `requestRuleInfo`.

View source

requestServerInfo

function requestServerInfo()

Implements the `requestServerInfo` operation for `miniquake.net_control` (request server info).

View source

validConnectRequest

inline function validConnectRequest(parsed)

Report whether valid connect request.

ParameterTypeDefaultDescription
parseddynamic—The parsed input consumed by `validConnectRequest`.

View source

validQuakeRequest

function validQuakeRequest(parsed)

Report whether valid quake request.

ParameterTypeDefaultDescription
parseddynamic—The parsed input consumed by `validQuakeRequest`.

View source

validServerInfoRequest

inline function validServerInfoRequest(parsed)

Report whether valid server info request.

ParameterTypeDefaultDescription
parseddynamic—The parsed input consumed by `validServerInfoRequest`.

View source

wrap

function wrap(buffer)

Implements the `wrap` operation for `miniquake.net_control` (wrap).

ParameterTypeDefaultDescription
bufferdynamic—The buffer input consumed by `wrap`.

View source