MiniQuake2

src/miniquake2/protocol/netchan.ml

Provides miniquake2 protocol netchan facilities for this project.

Package
miniquake2.protocol.netchan
Reachable
Yes

Imports

Declarations

canQueueReliableFragments

function canQueueReliableFragments(channel, fragments)

Report whether can queue reliable fragments.

ParameterTypeDefaultDescription
channeldynamic—channel value consumed by this operation.
fragmentsdynamic—fragments value consumed by this operation.

View source

canReliable

function canReliable(channel)

Report whether can reliable.

ParameterTypeDefaultDescription
channeldynamic—channel value consumed by this operation.

View source

needReliable

function needReliable(channel)

Return the need reliable value.

ParameterTypeDefaultDescription
channeldynamic—channel value consumed by this operation.

View source

Netchan_CanReliable

function Netchan_CanReliable(channel)

Report whether netchan can reliable.

ParameterTypeDefaultDescription
channeldynamic—channel value consumed by this operation.

View source

Netchan_NeedReliable

function Netchan_NeedReliable(channel)

Return the netchan need reliable value.

ParameterTypeDefaultDescription
channeldynamic—channel value consumed by this operation.

View source

Netchan_OutOfBand

function Netchan_OutOfBand(data)

Return the netchan out of band value.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.

View source

Netchan_OutOfBandPrint

function Netchan_OutOfBandPrint(text)

Print netchan out of band.

ParameterTypeDefaultDescription
textdynamic—Text consumed by the operation.

View source

Netchan_Process

function Netchan_Process(channel, datagram, now)

Process netchan.

ParameterTypeDefaultDescription
channeldynamic—channel value consumed by this operation.
datagramdynamic—datagram value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source

Netchan_Setup

function Netchan_Setup(sock, remoteAddress, qport, now)

Return the netchan setup value.

ParameterTypeDefaultDescription
sockdynamic—sock value consumed by this operation.
remoteAddressdynamic—remoteAddress value consumed by this operation.
qportdynamic—qport value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source

Netchan_Transmit

function Netchan_Transmit(channel, length, data, now)

Return the netchan transmit value.

ParameterTypeDefaultDescription
channeldynamic—channel value consumed by this operation.
lengthdynamic—length value consumed by this operation.
datadynamic—Input data consumed by the operation.
nowdynamic—now value consumed by this operation.

View source

nextSequence

function nextSequence(sequence)

Return the next sequence value.

ParameterTypeDefaultDescription
sequencedynamic—sequence value consumed by this operation.

View source

outOfBand

function outOfBand(payload)

Return the out of band value.

ParameterTypeDefaultDescription
payloaddynamic—payload value consumed by this operation.

View source

outOfBandPrint

function outOfBandPrint(text)

Print out of band.

ParameterTypeDefaultDescription
textdynamic—Text consumed by the operation.

View source

pendingReliableBytes

function pendingReliableBytes(channel)

Report whether pending reliable bytes.

ParameterTypeDefaultDescription
channeldynamic—channel value consumed by this operation.

View source

process

function process(channel, datagram, now)

Process state.

ParameterTypeDefaultDescription
channeldynamic—channel value consumed by this operation.
datagramdynamic—datagram value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source

promoteReliable

function promoteReliable(channel)

Return the promote reliable value.

ParameterTypeDefaultDescription
channeldynamic—channel value consumed by this operation.

View source

queueReliable

function queueReliable(channel, payload)

Queue reliable.

ParameterTypeDefaultDescription
channeldynamic—channel value consumed by this operation.
payloaddynamic—payload value consumed by this operation.

View source

queueReliableFragments

function queueReliableFragments(channel, fragments)

Queue complete application payload fragments without splitting the bytes of an svc/clc command. The operation is failure-atomic: capacity is checked on detached queue/buffer state, then committed in one small mutation boundary. A false result is bounded backpressure; malformed state/input is an error.

ParameterTypeDefaultDescription
channeldynamic—channel value consumed by this operation.
fragmentsdynamic—fragments value consumed by this operation.

View source

sequenceAtLeast

function sequenceAtLeast(candidate, current)

Return the sequence at least value.

ParameterTypeDefaultDescription
candidatedynamic—candidate value consumed by this operation.
currentdynamic—current value consumed by this operation.

View source

sequenceNewer

function sequenceNewer(candidate, current)

Modular comparison keeps the reference ordering until the 31-bit counter wraps, then preserves the same stale/duplicate protection across the wrap.

ParameterTypeDefaultDescription
candidatedynamic—candidate value consumed by this operation.
currentdynamic—current value consumed by this operation.

View source

setup

function setup(sock, remoteAddress, qport, now)

Return the setup value.

ParameterTypeDefaultDescription
sockdynamic—sock value consumed by this operation.
remoteAddressdynamic—remoteAddress value consumed by this operation.
qportdynamic—qport value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source

transmit

function transmit(channel, unreliable, now)

Return the transmit value.

ParameterTypeDefaultDescription
channeldynamic—channel value consumed by this operation.
unreliabledynamic—unreliable value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source

validateReliableQueue

function validateReliableQueue(channel)

Validate reliable queue.

ParameterTypeDefaultDescription
channeldynamic—channel value consumed by this operation.

View source