PawnLibs/network
Summary
A helper library for packing and unpacking network data.
Description
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.
Example
TBD
PawnLibs/network/NetWorkGetData
Summary
Get packed data to broadcast.
Synopsis
Return value
Packed data to broadcast.
See also
- broadcastMessage()
- broadcastPacket()
PawnLibs/network/NetWorkReadSignedValue
Summary
Read specified number of bits of packed signed value.
Synopsis
Inputs
- bits - a number of bits to get
Return value
Unpacked signed value.
PawnLibs/network/NetWorkReadValue
Summary
Read specified number of bits of packed unsigned value.
Synopsis
Inputs
- bits - a number of bits to get
Return value
Unpacked unsigned value.
PawnLibs/network/NetWorkReset
Summary
Reset state before storing new data to pack.
Synopsis
PawnLibs/network/NetWorkSetData
Summary
Populate state with a new data to unpack.
Synopsis
Inputs
- pkt - packet data to unpack
- size - data size
See also
- ON_Packet()
PawnLibs/network/NetWorkWriteSignedValue
Summary
Store specified number of bits from some signed value.
Synopsis
Inputs
- value - a value to store data from
- bits - a number of bits to store
PawnLibs/network/NetWorkWriteValue
Summary
Store specified number of bits from some unsigned value.
Synopsis
Inputs
- value - a value to store data from
- bits - a number of bits to store