Difference between revisions of "SDK 6.3/PAWN/Network"

From WowWiki
Jump to navigation Jump to search
(Official WOWCube SDK 6.3 documentation (automated publish from SDK headers))
 
(Official WOWCube SDK 6.3 documentation (automated publish from SDK headers))
Line 1: Line 1:
 
{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, PAWN API. Generated from the canonical SDK headers — do not edit by hand; regenerate from source.}}
 
{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, PAWN API. Generated from the canonical SDK headers — do not edit by hand; regenerate from source.}}
 +
 +
{{SDK 6.3 nav}}
 +
 +
''← [[SDK 6.3]] · PAWN / Network''
  
 
Pawn works with cells which has a size of 4 bytes. Native interfaces
 
Pawn works with cells which has a size of 4 bytes. Native interfaces
Line 82: Line 86:
 
:: packet data to unpack
 
:: packet data to unpack
  
See also: ON_Packet()
+
See also: [[SDK 6.3/PAWN/Core#ON_Packet|ON_Packet()]]
  
 
===NetWorkGetData===
 
===NetWorkGetData===
Line 94: Line 98:
 
: Packed data to broadcast.
 
: Packed data to broadcast.
  
See also: broadcastPacket()
+
See also: [[SDK 6.3/PAWN/Core#broadcastPacket|broadcastPacket()]]
  
 
===NetWorkGetDataSize===
 
===NetWorkGetDataSize===
Line 106: Line 110:
 
: Packed size to broadcast.
 
: Packed size to broadcast.
  
See also: broadcastPacket()
+
See also: [[SDK 6.3/PAWN/Core#broadcastPacket|broadcastPacket()]]
  
 
[[Category:SDK 6.3]]
 
[[Category:SDK 6.3]]
 
[[Category:PAWN API]]
 
[[Category:PAWN API]]

Revision as of 19:36, 25 July 2026

Official WOWCube SDK documentation. SDK 6.3, PAWN API. Generated from the canonical SDK headers — do not edit by hand; regenerate from source.

SDK 6.3 · PAWN API: Core · Graphics · Topology · Sound · Motion Sensor · Leaderboard · Splash Screen · Physics · Network · Save · Scramble · Logging
C++: Native API · Application · GFX Engine  ·  Rust: Rust API (experimental)  ·  Changelog

SDK 6.3 · PAWN / Network

Pawn works with cells which has a size of 4 bytes. Native interfaces handling generic data like network messages have size limits for that data. If application does not need to work with a large numbers, several values can be packed into a single cell. This library provides some convenient functions to pack and unpack such values from array of cells which can be broadcasted over network by core functions.

Functions

NetWorkReset

Syntax:

NetWorkReset()

Description:

Reset state before storing new data to pack.

NetWorkWriteValue

Syntax:

NetWorkWriteValue(value, bits)

Description:

Store specified number of bits from some unsigned value.

Arguments:

value
a value to store data from
bits
a number of bits to store

NetWorkWriteSignedValue

Syntax:

NetWorkWriteSignedValue(value, bits)

Description:

Store specified number of bits from some signed value.

Arguments:

value
a value to store data from
bits
a number of bits to store

NetWorkReadValue

Syntax:

NetWorkReadValue(bits)

Description:

Read specified number of bits of packed unsigned value.

Arguments:

bits
a number of bits to get

Return values:

Unpacked unsigned value.

NetWorkReadSignedValue

Syntax:

NetWorkReadSignedValue(bits)

Description:

Read specified number of bits of packed signed value.

Arguments:

bits
a number of bits to get

Return values:

Unpacked signed value.

NetWorkSetData

Syntax:

NetWorkSetData(const pkt[], size)

Description:

Populate state with a new data to unpack.

Arguments:

pkt
packet data to unpack

See also: ON_Packet()

NetWorkGetData

Syntax:

NetWorkGetData()

Description:

Get packed data to broadcast.

Return values:

Packed data to broadcast.

See also: broadcastPacket()

NetWorkGetDataSize

Syntax:

NetWorkGetDataSize()

Description:

Get packed data to broadcast.

Return values:

Packed size to broadcast.

See also: broadcastPacket()