Skip to content

libraries/sh_net

Source: gamemode/framework/libraries/sh_net.lua

Enqueue a net job to prevent overlapping net.Start calls.

Documented functions: 7

Functions


ax.net:BuildPayload(arguments)

Builds the encoded payload for a net message.

Realm: shared

Parameters

Name Type Description
arguments table -

Returns

  • string|boolean: Encoded payload or false on failure.

ax.net:Enqueue(job)

Enqueue a net job to prevent overlapping net.Start calls.

Realm: shared

Parameters

Name Type Description
job function Callback that receives a done() function.

ax.net:Hook(name, callback, bNoDelay)

Hooks a network message.

Realm: shared

Parameters

Name Type Description
name string Unique identifier.

ax.net:ProcessQueue()

Processes the next queued net job.

Realm: shared


ax.net:QueueMessage(name, arguments, sendFunc, debugMessage, warningMessage)

Queues a net message to avoid overlapping net.Start calls.

Realm: shared

Parameters

Name Type Description
name string -
arguments table -
sendFunc function -
debugMessage string -
warningMessage string -

ax.net:Start(target, name, ...)

Starts a stream.

Realm: shared

Parameters

Name Type Description
target Player, table, vector or nil (nil = broadcast or to server).
name string Hook name.

ax.net:Start(name, ...)

Starts a stream.

Realm: shared

Parameters

Name Type Description
target Player, table, vector or nil (nil = broadcast or to server).
name string Hook name.