SCRIPTING API / Multiplayer / NetworkReader
NetworkReader
Reads a message payload in the order its values were written (NetworkMessage.CreateReader).
Kindclass
NamespaceKroys.EngineScripting
Members18
Source
Network.csDECLARATION
Declaration
Namespace Kroys.EngineScripting.
Declaration
public sealed class NetworkReader
REFERENCE
Members
Constructors
#public NetworkReader(byte[] payload)Creates a reader over payload bytes.
Properties
#public int Remaining { get; }Bytes not read yet.
Methods
#public bool ReadBool()Reads a bool.
#public byte ReadByte()Reads a byte.
#public short ReadInt16()Reads a 16-bit integer.
#public ushort ReadUInt16()Reads an unsigned 16-bit integer.
#public int ReadInt32()Reads a 32-bit integer.
#public uint ReadUInt32()Reads an unsigned 32-bit integer.
#public long ReadInt64()Reads a 64-bit integer.
#public ulong ReadUInt64()Reads an unsigned 64-bit integer.
#public float ReadSingle()Reads a float.
#public double ReadDouble()Reads a double.
#public string ReadString()Reads a string written with Write(string) (UTF-8, length-prefixed).
#public Vector2 ReadVector2()Reads a Vector2.
#public Vector3 ReadVector3()Reads a Vector3.
#public Quaternion ReadQuaternion()Reads a Quaternion.
#public Entity ReadEntity()Reads an entity handle written with Write(Entity), as an entity of the current world.
#public byte[] ReadBytes()Reads a byte block written with WriteBytes.
Signatures
public NetworkReader(byte[] payload) public int Remaining { get; } public bool ReadBool() public byte ReadByte() public short ReadInt16() public ushort ReadUInt16() public int ReadInt32() public uint ReadUInt32() public long ReadInt64() public ulong ReadUInt64() public float ReadSingle() public double ReadDouble() public string ReadString() public Vector2 ReadVector2() public Vector3 ReadVector3() public Quaternion ReadQuaternion() public Entity ReadEntity() public byte[] ReadBytes()
KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.