Method | Description | |
---|---|---|
Broadcast ( LuaState luaState ) : void |
Sends the currently built net message to all connected players.
|
|
BytesWritten ( LuaState luaState ) : double |
Returns the size of the current message in bytes.
|
|
ReadBit ( LuaState luaState ) : double |
Reads a bit from the received net message.
|
|
ReadBool ( LuaState luaState ) : bool |
Reads a boolean from the received net message.
|
|
ReadData ( LuaState luaState, double length ) : string |
Reads pure binary data from the message.
|
|
ReadDouble ( LuaState luaState ) : double |
Reads a double-precision number from the received net message.
|
|
ReadFloat ( LuaState luaState ) : float |
Reads a floating-point number from the received net message.
|
|
ReadHeader ( LuaState luaState ) : double |
Returns the "header" of the message which contains a short which can be converted to the corresponding message name via util.NetworkIDToString.
|
|
ReadInt ( LuaState luaState, double bitCount = 32.0D ) : int |
Reads an integer from the received net message.
|
|
ReadString ( LuaState luaState ) : string |
Reads a null terminated string from the net stream. The size of the string is 8 bits plus 8 bits for every ASCII character in the string.
|
|
ReadUInt ( LuaState luaState, double bitCount = 32.0D ) : uint |
Reads an unsigned integer with the specified number of bits from the received net message.
|
|
SendToServer ( LuaState luaState ) : void |
Sends the current message to the server.
|
|
Start ( LuaState luaState, string messageName, bool unreliable = false ) : bool |
Begins a new net message.
|
|
WriteBit ( LuaState luaState, bool boolean ) : void |
Appends a boolean (as 0 or 1) to the current net message.
|
|
WriteData ( LuaState luaState, string binaryData, double length ) : void |
Writes a chunk of binary data to the message.
|
|
WriteDouble ( LuaState luaState, double @double ) : void |
Appends a double-precision number to the current net message.
|
|
WriteFloat ( LuaState luaState, float @float ) : void |
Appends a float (number with decimals) to the current net message.
|
|
WriteInt ( LuaState luaState, int integer, double bitCount = 32.0D ) : void |
Appends an integer (number without decimals) to the current net message.
|
|
WriteString ( LuaState luaState, string @string ) : void |
Appends a string to the current net message. The size of the string is 8 bits plus 8 bits for every ASCII character in the string. The maximum allowed length of a single written string is 1024 characters.
|
|
WriteUInt ( LuaState luaState, uint unsignedInteger, double numberOfBits = 32.0D ) : void |
Appends an unsigned integer with the specified number of bits to the current net message.
|
public static Broadcast ( LuaState luaState ) : void | ||
luaState | LuaState | Pointer to lua_State struct. |
return | void |
public static BytesWritten ( LuaState luaState ) : double | ||
luaState | LuaState | Pointer to lua_State struct. |
return | double |
public static ReadBit ( LuaState luaState ) : double | ||
luaState | LuaState | Pointer to lua_State struct. |
return | double |
public static ReadBool ( LuaState luaState ) : bool | ||
luaState | LuaState | Pointer to lua_State struct. |
return | bool |
public static ReadData ( LuaState luaState, double length ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
length | double |
/// The length of the data to be read, in bytes.
/// |
return | string |
public static ReadDouble ( LuaState luaState ) : double | ||
luaState | LuaState | Pointer to lua_State struct. |
return | double |
public static ReadFloat ( LuaState luaState ) : float | ||
luaState | LuaState | Pointer to lua_State struct. |
return | float |
public static ReadHeader ( LuaState luaState ) : double | ||
luaState | LuaState | Pointer to lua_State struct. |
return | double |
public static ReadInt ( LuaState luaState, double bitCount = 32.0D ) : int | ||
luaState | LuaState | Pointer to lua_State struct. |
bitCount | double | The amount of bits to be read. |
return | int |
public static ReadString ( LuaState luaState ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
return | string |
public static ReadUInt ( LuaState luaState, double bitCount = 32.0D ) : uint | ||
luaState | LuaState | Pointer to lua_State struct. |
bitCount | double | The size of the integer to be read, in bits. |
return | uint |
public static SendToServer ( LuaState luaState ) : void | ||
luaState | LuaState | Pointer to lua_State struct. |
return | void |
public static Start ( LuaState luaState, string messageName, bool unreliable = false ) : bool | ||
luaState | LuaState | Pointer to lua_State struct. |
messageName | string | The name of the message to send. |
unreliable | bool | If set to true, the message is not guaranteed to reach its destination. |
return | bool |
public static WriteBit ( LuaState luaState, bool boolean ) : void | ||
luaState | LuaState | Pointer to lua_State struct. |
boolean | bool | Bit status (false = 0, true = 1) to be sent. |
return | void |
public static WriteData ( LuaState luaState, string binaryData, double length ) : void | ||
luaState | LuaState | Pointer to lua_State struct. |
binaryData | string | The binary data to be sent. |
length | double | The length of the binary data to be sent, in bytes. |
return | void |
public static WriteDouble ( LuaState luaState, double @double ) : void | ||
luaState | LuaState | Pointer to lua_State struct. |
@double | double | |
return | void |
public static WriteFloat ( LuaState luaState, float @float ) : void | ||
luaState | LuaState | Pointer to lua_State struct. |
@float | float | |
return | void |
public static WriteInt ( LuaState luaState, int integer, double bitCount = 32.0D ) : void | ||
luaState | LuaState | Pointer to lua_State struct. |
integer | int | The integer to be sent. |
bitCount | double |
/// The amount of bits the number consists of. (signed)
/// |
return | void |
public static WriteString ( LuaState luaState, string @string ) : void | ||
luaState | LuaState | Pointer to lua_State struct. |
@string | string | |
return | void |
public static WriteUInt ( LuaState luaState, uint unsignedInteger, double numberOfBits = 32.0D ) : void | ||
luaState | LuaState | Pointer to lua_State struct. |
unsignedInteger | uint | The unsigned integer to be sent. |
numberOfBits | double | /// The size of the integer to be sent, in bits. Acceptable values range from 1 to 32. 1 = bit, /// 4 = nibble, 8 = byte, 16 = short, 32 = long. /// |
return | void |