Files
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.
| Parameter | Type | Default | Description |
|---|
channel | dynamic | — | channel value consumed by this operation. |
fragments | dynamic | — | fragments value consumed by this operation. |
View source
# canReliable
function canReliable(channel)
Report whether can reliable.
| Parameter | Type | Default | Description |
|---|
channel | dynamic | — | channel value consumed by this operation. |
View source
# needReliable
function needReliable(channel)
Return the need reliable value.
| Parameter | Type | Default | Description |
|---|
channel | dynamic | — | channel value consumed by this operation. |
View source
# Netchan_CanReliable
function Netchan_CanReliable(channel)
Report whether netchan can reliable.
| Parameter | Type | Default | Description |
|---|
channel | dynamic | — | channel value consumed by this operation. |
View source
# Netchan_NeedReliable
function Netchan_NeedReliable(channel)
Return the netchan need reliable value.
| Parameter | Type | Default | Description |
|---|
channel | dynamic | — | channel value consumed by this operation. |
View source
# Netchan_OutOfBand
function Netchan_OutOfBand(data)
Return the netchan out of band value.
| Parameter | Type | Default | Description |
|---|
data | dynamic | — | Input data consumed by the operation. |
View source
# Netchan_OutOfBandPrint
function Netchan_OutOfBandPrint(text)
Print netchan out of band.
| Parameter | Type | Default | Description |
|---|
text | dynamic | — | Text consumed by the operation. |
View source
# Netchan_Process
function Netchan_Process(channel, datagram, now)
Process netchan.
| Parameter | Type | Default | Description |
|---|
channel | dynamic | — | channel value consumed by this operation. |
datagram | dynamic | — | datagram value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
View source
# Netchan_Setup
function Netchan_Setup(sock, remoteAddress, qport, now)
Return the netchan setup value.
| Parameter | Type | Default | Description |
|---|
sock | dynamic | — | sock value consumed by this operation. |
remoteAddress | dynamic | — | remoteAddress value consumed by this operation. |
qport | dynamic | — | qport value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
View source
# Netchan_Transmit
function Netchan_Transmit(channel, length, data, now)
Return the netchan transmit value.
| Parameter | Type | Default | Description |
|---|
channel | dynamic | — | channel value consumed by this operation. |
length | dynamic | — | length value consumed by this operation. |
data | dynamic | — | Input data consumed by the operation. |
now | dynamic | — | now value consumed by this operation. |
View source
# nextSequence
function nextSequence(sequence)
Return the next sequence value.
| Parameter | Type | Default | Description |
|---|
sequence | dynamic | — | sequence value consumed by this operation. |
View source
# outOfBand
function outOfBand(payload)
Return the out of band value.
| Parameter | Type | Default | Description |
|---|
payload | dynamic | — | payload value consumed by this operation. |
View source
# outOfBandPrint
function outOfBandPrint(text)
Print out of band.
| Parameter | Type | Default | Description |
|---|
text | dynamic | — | Text consumed by the operation. |
View source
# pendingReliableBytes
function pendingReliableBytes(channel)
Report whether pending reliable bytes.
| Parameter | Type | Default | Description |
|---|
channel | dynamic | — | channel value consumed by this operation. |
View source
# process
function process(channel, datagram, now)
Process state.
| Parameter | Type | Default | Description |
|---|
channel | dynamic | — | channel value consumed by this operation. |
datagram | dynamic | — | datagram value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
View source
# promoteReliable
function promoteReliable(channel)
Return the promote reliable value.
| Parameter | Type | Default | Description |
|---|
channel | dynamic | — | channel value consumed by this operation. |
View source
# queueReliable
function queueReliable(channel, payload)
Queue reliable.
| Parameter | Type | Default | Description |
|---|
channel | dynamic | — | channel value consumed by this operation. |
payload | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
channel | dynamic | — | channel value consumed by this operation. |
fragments | dynamic | — | fragments value consumed by this operation. |
View source
# sequenceAtLeast
function sequenceAtLeast(candidate, current)
Return the sequence at least value.
| Parameter | Type | Default | Description |
|---|
candidate | dynamic | — | candidate value consumed by this operation. |
current | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
candidate | dynamic | — | candidate value consumed by this operation. |
current | dynamic | — | current value consumed by this operation. |
View source
# setup
function setup(sock, remoteAddress, qport, now)
Return the setup value.
| Parameter | Type | Default | Description |
|---|
sock | dynamic | — | sock value consumed by this operation. |
remoteAddress | dynamic | — | remoteAddress value consumed by this operation. |
qport | dynamic | — | qport value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
View source
# transmit
function transmit(channel, unreliable, now)
Return the transmit value.
| Parameter | Type | Default | Description |
|---|
channel | dynamic | — | channel value consumed by this operation. |
unreliable | dynamic | — | unreliable value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
View source
# validateReliableQueue
function validateReliableQueue(channel)
Validate reliable queue.
| Parameter | Type | Default | Description |
|---|
channel | dynamic | — | channel value consumed by this operation. |
View source