NetMessage¶
Represents a network message used for communication between clients and servers.
Methods¶
AddString(key: string, value: string) → nil¶
Adds a string value to the message with the specified key.
AddInt(key: string, value: number) → nil¶
Adds an integer value to the message with the specified key.
AddBool(key: string, value: boolean) → nil¶
Adds a boolean value to the message with the specified key.
AddNumber(key: string, value: number) → nil¶
Adds a number value to the message with the specified key.
AddVector2(key: string, value: Vector2) → nil¶
Adds a Vector2 value to the message with the specified key.
AddVector3(key: string, value: Vector3) → nil¶
Adds a Vector3 value to the message with the specified key.
AddColor(key: string, value: Color) → nil¶
Adds a Color value to the message with the specified key.
AddInstance(key: string, value: Instance) → nil¶
Adds an Instance value to the message with the specified key.
AddBuffer(key: string, buffer: buffer) → nil¶
Adds an Buffer value to the message with the specified key.
GetString(key: string) → string¶
Gets a string value from the message with the specified key.
GetInt(key: string) → number¶
Gets an integer value from the message with the specified key.
GetNumber(key: string) → number¶
Gets a number value from the message with the specified key.
GetBool(key: string) → boolean¶
Gets a boolean value from the message with the specified key.
GetVector2(key: string) → Vector2¶
Gets a Vector2 value from the message with the specified key.
GetVector3(key: string) → Vector3¶
Gets a Vector3 value from the message with the specified key.
GetColor(key: string) → Color¶
Gets a Color value from the message with the specified key.
GetInstance(key: string) → Instance¶
Gets an Instance value from the message with the specified key.
GetBuffer(key: string) → buffer¶
Gets an Buffer value from the message with the specified key.
New() → NetMessage¶
Creates a new NetMessage instance.